Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Sharepoint connection for documents - navigating subfolders

I have a canvas app, with a connection to a SharePoint document library. I use clearcollect to retrieve the contents into a collection. As you can see in the attachment, it only brings back the contents of the root folder. I would like to be able to open the folder and view the contents of that folder. Any ideas?

Community Support
Community Support

Re: Sharepoint connection for documents - navigating subfolders

Hi @jamess ,

Do you want to display the contents of the subfolder from SP Library ('Shared Documents') within your app?


Actually, when you create a connection to a SP Library from your app, it would retrieve all contents within the Root folder, including the subfolders, and these files stored within these subfolders.


If you only want to display the contens within the Root folder firstly, and then click the subfolder within the Root folder, then display contents under the subfolder, I think multiple Gallery controls could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:




Set the Items property of the first Gallery to following:

Filter(MyLibrary2, 'Folder path'= "MyLibrary2/")

Set the Items property of the second Gallery to following:

Filter(MyLibrary2, 'Folder path' = "MyLibrary2/" & Gallery1.Selected.'File name with extension' & "/")

When you select a folder within the Gallery1, then the contents within the folder would be displayed within the second Gallery.


Pleae consider take a try with above solution, check if the issue is solved.


More details about the Filter function in PowerApps, please check the following article:

Filter function


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources


Microsoft Ignite

This will be a conference that you do not want to miss!


New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,307)