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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Display ONLY Sh...
Power Apps
Answered

How to Display ONLY SharePoint Library Sub-Folder Files in Gallery

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

I am using the following formula to retrieve and display files from a SharePoint library sub-folder in a Gallery.

The Gallery is showing both the folder and sub-folder contents. Is there a way to edit the formula so that ONLY the files in the sub-folder are shown in the Gallery?

The '1' in the Gallery is the folder level content, the '2' is the sub-folder level content.
Phineas_0-1703450704913.png


Folder and Sub-Folder images -

Phineas_1-1703450795676.png

 

Phineas_2-1703450863107.png

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @Phineas ,

    If you want to do any interaction with a SharePoint Library involving folder or file names, you need to be aware that queries on both are not Delegable. The easiest way to overcome this is to include the folder name/s in field/s in the Library metadata (I have one with three levels of folders). This can be done with Power Automate when the file is created.

    You can then easily query the field/s in a Delegable manner.

     

    Please click Accept as solution 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 giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    So, add this column to the Folder?

    Phineas_0-1703454782673.png


    Then add an 'Update Action' in the flow that adds the actual folder name to the above circled?

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @Phineas ,

    Yes - then you can query on that field.

     

    Please click Accept as solution 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 giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Do I need to add this column at both levels or only at the top?

    Phineas_0-1703456140544.png

     

  • Verified answer
    WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @Phineas ,

    I use a separate field for each level as storing the full path means querying with a full string containing this (which is possible if you want to go that way), however if the sub-folder is has a unique name (no other subfolder under any other folder has the same name), you can query this field only.

     

    Please click Accept as solution 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 giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard