cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ck25415
Level 8

Delegation question and working of delegation

Hello,

 

I have a powerapps with SPO list and library as datsource with total Items greater than 2000 but not individually. I have used filter function on person/group and to delegate items I have increased the limit to 2000. I am seeing issues with random user which I cant replicate, each user on selecting a item in a table can click on a buttonwhich has a launch function to load a different powerapp, part of the URL has a filter function on person/group field(list datasource has less than 2000 items) to get relevant item. The button does not work for some users, it gets disbaled once they click and does nothing and I suspect delegation is the root cause but I would like to know few questions before I can confirm. 

 

 

1. How Does powerapps load the items from SPO dataource, is it random or does it start from the oldest created item.

2. If powerapps uses two datsources with a total of more than 2000 items, list1 has 1000 items and list2 has 1500 items, is there a chance that powerapps stops loading at 1000th item from list2(assuming list1 is retrived) even though both the datasources are not used together in any filter function.

 

 

 

Thanks,

 

5 REPLIES 5
RussellGove
Level 10

Re: Delegation question and working of delegation

hi,

you mentioned The button does not work for some users. do those users have permission to run the second app?

Highlighted
ck25415
Level 8

Re: Delegation question and working of delegation

Yes, they do have access. They have accessed the app before.


@RussellGove wrote:

hi,

you mentioned The button does not work for some users. do those users have permission to run the second app?


 

Super User
Super User

Re: Delegation question and working of delegation

@ck25415 

Are you still having issues with your App?

 

In regard to your questions:

1. To the best of my knowledge and testing - it is not discerning on the way it loads items.  The request will ask the datasource for the records and the datasource will return results in the order it sees fit based on how it is set up.  For SharePoint, it's normally in ID order.

2. Loading items locally (which by the way, is not delegation) is not limited (except for memory).  If you have 2000 in one list and 5000 in another, you can certainly have 7000 in local memory.  However, PowerApps is limited to 2000 records at a time for "fetching".  If you have no particular scheme to be able to fetch 2000 at a time and then more after that, then you will be limited.  We had a pretty good discussion recently that dealt with the limits and how to load a large datasource.  You might want to reference that for some more information.

 

Just to be clear - delegation is the act of taking a query and passing it on to the data source.  Each data source type can handle delegating queries, but each type has its limits on what it can delegate.  You'll want to check the SharePoint connector reference for what can and cannot be delegated to SharePoint. 

 

Basically, if you can delegate a query to the datasource, there is no limit to the number of records that the query will run against. BUT, if that query returns more than the 2000 limit for PowerApps, then that will be all you get back.

If you cannot delegate a query and the integrity of your query against the total data source is important, then YOU will have to devise a way to pull down all of the data to PowerApps in order to execute your query against it.  In that case, as you build your local copy of the data, you will be limited to 2000 records per "pull".  If you have 10000 records, you'll have to do 5 pulls with delegable queries....you'll want to read that linked posting above for more on this.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Re: Delegation question and working of delegation

I personally have experienced problems where I used the ClearCollect funtion against a SharePoint list with well over 2000 records into a local collection using the filter function with a delagable query.

 

For example

Screen OnVisible: ClearCollect( LocalCostCodes, Filter(SPDepartmentCostCodes, DepartmentName = "ABC")

 

In this hypothetical example the SharePoint list contained 8000 list items, however only say 50 of them had a DepartmentName of "ABC".

 

When I however then set the gallery control data source to LocalCostCodes, as the number of items in the SharePoint list grew I began to experience issues where the gallery no longer dispayed the items from the local collection. I then changed the control data source to directly query the SharePoint data source, i.e. Filter(SPDepartmentCostCodes, DepartmentName = "ABC", and thereafter I no longer experienced that particular issue.

 

I'm not sure if this helps you particular issue though...

ck25415
Level 8

Re: Delegation question and working of delegation

Hello @RandyHayes ,

 

Thanks for the reply. I still have the issue and I have contacted the support team over this issue. Not much help though,  I was told there are too many delegation warnings in the app and I was advised to avoid the warnings, change the data row limit from 2000 to 500 and test the app. 

 

I am planning to use multiple collections and change the quereis to avoid the delgations. I hope, I will not face an issue with the collections as mentioned by @Office365Master (thanks @Office365Master  for sharing your experience)

 

Again, Thanks for sharing the discussion on large datasource data load. I have learnt something new.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (7,366)