cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Continued Contributor
Continued Contributor

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

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-onlin...

 

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

 

Thanks for the help,

 

 

8 REPLIES 8
Highlighted
Dual Super User III
Dual Super User III

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

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Dual Super User II
Dual Super User II

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

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

Highlighted
Continued Contributor
Continued Contributor

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

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.

Highlighted
Dual Super User II
Dual Super User II

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

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

Highlighted
Community Support
Community Support

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

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,

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.
Highlighted
Dual Super User III
Dual Super User III

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

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Continued Contributor
Continued Contributor

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

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.


 

Highlighted
Dual Super User III
Dual Super User III

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

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,675)