cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pheil
Level: Powered On

Gallery to show files only in specific Sharepoint subdirectory

How can I get the BrowseGallery items to only display files from a specific subdirectory.  I'm getting delegation issues even though I know the exact subdirectory name and each subdirectory only has maybe 20 files max.  It seems like I could use Flow, but hopefully that isn't necessary.

 

The SharePoint source has over 800 folders, but I don't ever need to see them since I always know the subdirectory I want.

 

I was using this, but it stopped working after I loaded more folders into the document library.  "EWSInput.Text" is the subfolder name I will always have.

 

SortByColumns(Search(Filter(EWS, '{Path}'="EWS/" & EWSInput.Text & "/"), TextSearchBox1.Text, "{FilenameWithExtension}"), "Modified", If(SortDescending1, Descending, Ascending))
2 REPLIES 2
Super User
Super User

Re: Gallery to show files only in specific Sharepoint subdirectory

Hi @pheil,

Search() is not delegatable in Sharepoint and will always trigger a warning.  To avoid that, use Filter(datasource, StartsWith(ColumnNameControl.Value)) instead.  In your case SortByColumns (Filter(EWS, StartsWith('{Path}'="EWS/" & EWSInput.Text & "/",TextSearchBox1.Text)) ,"{FilenameWithExtension}"), "Modified", If(SortDescending1, Descending, Ascending))

For a full understanding of delegation in Powerapps and what functions are delegatable please review 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview and 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-list

pheil
Level: Powered On

Re: Gallery to show files only in specific Sharepoint subdirectory

Drrickryp Thank for the response.  I tried your suggetion after removing one duplicate parentheses, but I get the error in the attached image.  I also tried tweaking the StartsWith formula without luck.

 

SortByColumns(Filter(EWS, StartsWith('{Path}'="EWS/" & EWSInput.Text & "/",TextSearchBox1.Text)) ,"{FilenameWithExtension}", "Modified", If(SortDescending1, Descending, Ascending))

Untitled.png

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 93 members 4,512 guests
Please welcome our newest community members: