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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sharepoint Connector: ...
Power Apps
Unanswered

Sharepoint Connector: Documentation claims delegation support, but getting delegation warning.

(0) ShareShare
ReportReport
Posted on by 313

Hi, 

 

I want to list the contents of a Sharepoint folder which is created with a process number. 
While each process should have a small number of documents, the library will expand to several thousands.

 

I can connect and list the documents currently, but when I filter, I get a delegation warning. 

 

folder_name_var is a string with the name of the folder, like "process_12345".

 

I am trying to filter the list to show the current process folder, but I am getting a delegation warning in the underlined part: 

Filter(Documents, folder_name_var = 'Folder path' )

 

According to the Connector documentation,

https://docs.microsoft.com/en-us/connectors/sharepointonline/

The connector should support delegation for the Filter Clause, for text, number and boolean types, and the folder path is a string.

There is no mention of this being a known issue on the availability of Document Library support for PowerApps: 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-sharepoint-online

 

Is ther something I am doing wrong, or is the documentation lacking? 

 

Thanks for the help,

 

 

Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    The problem is that the Path isn't a string data type column, it is presented as a string value, but isn't a metadata column for the file.  I don't think any filter based on Path is considered delegable.

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @TiagoFreire 

     

    set folder_path to a variable before using it in your filter condition

     

    Filter(Documents, folder_name_var = varFolderPath  ) would work

    where varFolderPath  is the variable storing the folder path value

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • TiagoFreire Profile Picture
    313 on at

    I already have the path as a string variable, folder_name_var. 

    'Folder Path' is the Sharepoint Document Library's property name for the, well, folder path. 

     

    So there is no way to filter document libraries server-side? That makes the connector useless unless the library has less than 500 items.

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @TiagoFreire 

     

    You would have to create a single line of text column in your library which would have to store the path (can be done via Flow)

    The index this column in the document library and use this column for filtering purposes

     

    Long way to achive something simple but thats the problem with delegation

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @TiagoFreire ,

    Based on the issue that you mentioned, I think this issue is related to the "Folder Path" column in your Filter formula.

     

    I agree with @Pstork1 's thought almost. The "Folder Path" is not a normal Text type column in your SP Library, actually, it is a metadata type column in your SP Library.

     

    Currently, the metadata type column is a complex type column in SP Library, which could not be delegated within PowerApps app.

    More details about the supported delegated data type of SP in PowerApps, please check the following article:

    https://docs.microsoft.com/en-us/connectors/sharepointonline/#powerapps-data-type-mappings

     

    In order to get rid of this Delegation warning issue, as an alternative solution, please take a try with the following workaround:

    Set the OnStart property of the App control to following:

    ClearCollect(LibraryCollection, Documents)

    Then modify your Filter formula as below:

    Filter(LibraryCollection, 'Folder path' = folder_name_var)

    then re-load your app (fire the OnStart property of the App control), then check if the issue is solved.

     

    Note: Please also consider set the "Data row limit for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app, so you could process 2000 records at most locally in your app.

     

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

    Delegation

     

    Best regards,

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    There are lots of ways to filter document libraries with delegable functions, server side.  But the Path of the folder is not one of those ways.

  • TiagoFreire Profile Picture
    313 on at

    I accept the fact, but this is Microsoft being Microsoft, making things unnecessarily complicated. 

    Folder Path should be exposed as a simple string, requiring no hoopps and bounds to be used. 


    @Pstork1 wrote:

    There are lots of ways to filter document libraries with delegable functions, server side.  But the Path of the folder is not one of those ways.


     

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    I'm not going to try to justify or explain design decisions that Microsoft makes.  They don't ask me how to design it.  Whether the Folder name should be exposed as a simple string or not doesn't really matter.  What does matter is that it isn't exposed that way.  You can add it as a requested feature in the PowerApps Ideas forum, but for right now it doesn't work that way and complaining that Microsoft should have done it differently doesn't help or change anything.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard