web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Issue showing folder in a gallery

(0) ShareShare
ReportReport
Posted on by 6

I'm developing a test app and I'm having some issues displaying some folders correctly.

I'm showing a really small number of folders, so I don't think it's a performance problem, and I also increased the maximum number of row limit.

In the OnStart property of the app, I set two variables:

Set(varKIt, "X_ProjectDocs/!Template X_ProjectDocs/I SALES/");
Set(varRealization, "X_ProjectDocs/!Template X_ProjectDocs/II");

 
Then I have two different galleries called I SALES and REALIZATION, where I used this formula in the Items field:
 
Filter(X_ProjectDocs, 'folder path' = varKIt)      // for I SALES
Filter(X_ProjectDocs, StartsWith('folder path', varRealization))  // for REALIZATION
 

Then I just added a label with ThisItem.Name to show the results, but for the I SALES gallery it shows everything correctly, while in REALIZATION only 7 out of 10 folders are shown, and I don't know why.

 
I've also attached a picture showing both galleries so you can better understand the issue.

the i also should be able to see 05, 06, and 07 folders.
 
i take all the data from a sharepoint
Categories:
I have the same question (0)
  • Suggested answer
    venturemavenwill Profile Picture
    1,143 Super User 2025 Season 2 on at
    Issue showing folder in a gallery
    There are two possibilities:
    1. Delegation issue (less likely): This could happen if there are lots of files in the folders. Even though you only have a small number of folders, the collection you're getting might not be getting everything because of the number of files within those folders. However, since you increased the data row limit, this is probably not the issue.
    2. The three missing folders are empty (most likely): When you call a SharePoint API via Power Apps, by default it doesn't list empty folders. This is a known limitation of how SharePoint exposes folder data through the API.
     
    Can you confirm that the 3 folders are not empty? Or if you want to show also the empty folders, you may need to embed a Power Automate flow that tries to use an API endpoint like _api/web/GetFolderByServerRelativeUrl('Shared Documents')/Folders each time you want to load the folders within a library, and then return the data from the Power Automate flow into a collection. 
  • Suggested answer
    developerAJ Profile Picture
    4,344 on at
    Issue showing folder in a gallery
    Starts with is not delegable for library and that is the cause of the issue
     
    try using equal
     
     
  • GM-10111337-0 Profile Picture
    6 on at
    Issue showing folder in a gallery
    thanks for the answer.

    After doing several tests, I noticed that my data source actually contains more than 2,000 files/folders, so that is probably the cause of the issue.

    The app I need to build is fairly simple: it’s meant to display three “columns of folders” on the screen, and clicking on any folder would navigate to another screen where the files inside can be opened. On the screen, I will only show a few folders and files, but the underlying data source appears to be quite large.

    Would it be possible to use a single folder as the data source instead of the entire SharePoint library?


     
  • Suggested answer
    venturemavenwill Profile Picture
    1,143 Super User 2025 Season 2 on at
    Issue showing folder in a gallery
    @GM-10111337-0, the only workaround I can think of is to use Power Automate to retrieve a single folder, and then save the data into a collection. Here is a good guide on how to do it:
     
  • GM-10111337-0 Profile Picture
    6 on at
    Issue showing folder in a gallery
    thank a lot @venturemavenwill.

    One last question and i think i'm done with my app,
    i managed to get the folders i want in a specific path with Automate, but i'm having some issue with nested folders.
    in the automate i get the folders by sharepoint then a sleect to just get the names and last i convert to a text field the json, but with nested folder i get the error Content length mismatch, probably i can't convert it like that and i need something else, but the other options doesen't seem to fit.
    Do you know how to also get nested folder by any chance? i'm not finding many information about it.
    (Photo of the Automate attached)
  • WarrenBelz Profile Picture
    151,881 Most Valuable Professional on at
    Issue showing folder in a gallery
    There is a fairly easy solution here (which is what I do on all of my Libraries) - store the folder path in a Text column (I also store the file name) - use a Flow like this when the record is created. The query on the new text field is then delegable (so record numbers do not matter)
     
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • Suggested answer
    venturemavenwill Profile Picture
    1,143 Super User 2025 Season 2 on at
    Issue showing folder in a gallery
    I noticed that in your screenshot you set "Include Nested Item" to No, maybe that's the reason why you can't select those items?
     
     
     
    See if you are able to select them once you turn Include Nested Items to Yes. 
     
  • GM-10111337-0 Profile Picture
    6 on at
    Issue showing folder in a gallery
    I managed some way to do it, thank you all, your suggestions was very helpful

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 766 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 235

Last 30 days Overall leaderboard