Asking a quick question about delegation that is eluding me. I have a SharePoint List that is view restricted. Users can only see items that they create. Admins can see all.
In PowerApps - is the delegation factored on the items that the user can see?
SharePoint List - 1 - 1000 List ID's
1-100 ID - User Created and can see
400 - 500ID - User Created and can see
900 - 1000 ID - User Created can see
PowerApps - Default 500 Delegation Limit
Will the user see all the 300 entries that they created and see or will they only see the first 200 entries - or does the delegation factor in the items that the user does not have access to.
Many thanks.
Thanks for confirming.
Delegation occurs across all the items in the list irrespective of whether the User has access to that item or not.
Thanks
Delegation is across all the items. I suggest since you have about 1000 rows, you rather increase the delegation limit to 1000 or even 2000 to ensure everything is captured for all users. Because you cannot determine the row a users record can be located. Therefore if the delegation limit is 500, and a user has item in 502 row, none of the users could access the extra 2 rows. You can however use Sort descending order to turn the rows upside down, however you will still loss two rows.
For detailed examples, i suggest you follow @RezaDorrani on delegation series:
https://youtu.be/UaBmVUQx_Fk
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Thanks for the quick reply - however I think the question may have been misinterpreted. In the SharePoint list there is the setting where you can restrict the user to only be able to see the items that they created. In PowerApps - the user will only see their items.
My question is " Is delegation occurring across ALL the items - or only the items that the user has access to."
No, if your formula is not delegated then it does not mean that if you filter on the person who created it that only those will be retrieved.
It will only get the first 500 items and will filter on that, probably not returning all the records the user created.
Either you make your query conform with the delegation, and it filters on the complete database and returns max 500 items (max 2000 if you set the limit in the app), but then if one user has over 500 items not all will be returned.
Another options is to first load the complete SharePoint list into your app per batch by filtering on certain fields, e.g. 'Category', 'Department' ... . Best select fields that are likely to have limited values (dropdown lists etc.) and where each of them has not over 2000 items. Also loading per batch will of course have to be conform with delegation (see image below), which means you'll not be able to filter per batch in ID, but rather load all records for each department (batch). With each batch then add all records into one collection and you can work on that one. This is of course not the best way to work in PowerApps, which is not really created for this purpose, but in some cases it can be necessary if you're struggling with the delegation and it's doable.
Check this on delegation for SharePoint list: https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/
Of course, if you know you'll never have over 2000 items in your SharePoint list, then set the limit for delegation from 500 to 2000 in your settings of the app:
Hi @powertester1 ,
Update your limit to 2000 in Advanced settings and all of this will go away.
Delegation depends on the query you are doing - If you are using User().FullName, this this is not delegable, there is a workaround with a Variable, but 'Created By'.DisplayName is not Delegable either.
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.