Good day people I would like to ask some help. I have a gallery that filters a folder (logistics) in a sharepoint Library. Inside Logistics are four more subfolder. Subfolder 1,2,3, and 4 each subfolder contains multiple files, how do I count the number of files in each subfolder and display it beside the subfolders? Thank you for your help.
Solved! Go to Solution.
Hi @jan_mac ,
I done a test on my side, you can refer to my steps.
Here is my library called library1 with two folders:
Inside folder Logistics, there are four subfolders(folder sub1 has one file, folder sub2 has 2 files, folder sub3 has 3 files and folder sub4 has 4 files):
In my app, I have a Gallery that displays all subfolders inside folder Logistics:
Filter(library1,IsFolder = true &&'Folder path'="library1/Logistics/")
In this gallery, beside each subfloder, there is a label to show the file count of each subfolder:
CountRows(Filter(library1,'Folder path'="library1/Logistics" &"/"& ThisItem.Name &"/"))
Best regards,
Allen
Hi @jan_mac ,
I done a test on my side, you can refer to my steps.
Here is my library called library1 with two folders:
Inside folder Logistics, there are four subfolders(folder sub1 has one file, folder sub2 has 2 files, folder sub3 has 3 files and folder sub4 has 4 files):
In my app, I have a Gallery that displays all subfolders inside folder Logistics:
Filter(library1,IsFolder = true &&'Folder path'="library1/Logistics/")
In this gallery, beside each subfloder, there is a label to show the file count of each subfolder:
CountRows(Filter(library1,'Folder path'="library1/Logistics" &"/"& ThisItem.Name &"/"))
Best regards,
Allen
Thank you so much!! You even put the effort of creating a Sharepoint library and named the folders same to mine. Many blessings to you and your family! 😊
Hi @v-albai-msft,
I cant seem to apply these code to my gallery. Instead of showing the numbers of file, it shows number of folder.
Using the below return null value instead.
CountRows(Filter(Documents, !IsFolder = true && 'Folder path'="Shared Documents/Test1/"))
Is there any work around for this? I've running out of brain power trying to fix this.
Thanks in advance.
Try adding "& ThisItem.NameOfColumn" at the end of the formula.
Hi @jan_mac ,
Will try that later. Theres problem in connecting to powerapp make today.
This is a fine solution but non delegable so, don't use it if your document library has more than 500 items (or 2000 if you don't mind your app to run slow).
Josu
User | Count |
---|---|
252 | |
107 | |
88 | |
51 | |
44 |