cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
felipewltc
Helper II
Helper II

Sharepoint counter on a list

Hello, I have a SharePoint list, with Folders that I am going to use to add documents from different months, do you know a way to create a counter that can give me at the main screen the amount of files that I have in all the subfolders? Can we a ms flow or something, all works. I need to add the counter on the red arrow.

image.png

Something like this in that column: 

image.png

1 ACCEPTED SOLUTION

Accepted Solutions
Gristy
Resident Rockstar
Resident Rockstar

Hey

 

There is a column you can add to the view already called Item Child Count.

View solution in original post

10 REPLIES 10
Gristy
Resident Rockstar
Resident Rockstar

Hey

 

There is a column you can add to the view already called Item Child Count.

View solution in original post

Hey, thank you for the information but it does not work for what i want.


image.pngHere I can see the amount of files, that's good, but in the main screen I have no results.

image.png

 

Gristy
Resident Rockstar
Resident Rockstar

Hi,

 

Yes it only shows items and not folders and is not recursive.

 

The first thing you would need to do is make a custom folder content type, with metadata field that you can set as a number field, then replace all your folders with this content type.

 

After that you would need two flows item created and item deleted and then process the result figuring out which folders number to increment. 

 

If it was me i would trash the sub folders and use metadata instead, and then Item child count would work as expected.

Can you give me a hint? if is not too much

Gristy
Resident Rockstar
Resident Rockstar

Like i say, i would not do this via flow.

 

You either

a) get rid of folders and use metadata and use in-built item child count

or

b) built a Field Customizer to do the logic for you: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-cu...

I am new in all those things, so the second option is not the best one and I need that format, so I cannot remove the main folders 😕

Gristy
Resident Rockstar
Resident Rockstar

Yeah you will need to grab a SPFX developer to do the second option for you.

With a JSON option I should be able to, thank you for your time.

@felipewltc 

Is there a reason that you aren't using a library rather than a list?  If you were to use a library, you could create a grouped view that shows the number of documents in each group.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
AKRogers
Helper V
Helper V

Hi @felipewltc,

 

If you edit the view on the library you can add the Item Child Count field to the columns that show, not from the totals section of the view (which is what it looks like you tried previously): 

 

ItemChildCount.png

 

And it will show like this in your view:

FolderwithCount.png

 

You can then drop in some JSON column formatting if you need to!

 

Take care!

Ashley

 

If this response provided an answer to your question please mark it as a solution.

If you liked my reply, please give it a thumbs up! Thank you!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (13,032)