cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnkitShah55
Advocate III
Advocate III

Creating 200 rows collection from SP list causes Rate Limit Exceeded error

Scenario

 

I've two SP lists; list1 and list2

List1 contains name of 200 individual equipment ID with single column.

List2 contains their maintenance logs, having two columns equipment ID and maintenance date.

List2 item count will gradually increase day by day....

 

Requirement:

Creating a collection which contains equipment ID and their last maintenance date.

 

Present solution:

Create col1 with list1, 200 equipment IDs are captured

Create col2 with first column(column name EqID) of 200 equipment IDs from col1 and one empty column(column name LastDate).

Run Update function to load last maintenance date of individual equipment from list2 to LastDate column of col2 using combination of First,Sort,Filter functions.

 

The problem:

Sometimes rate limit exceeded error occurs.

I have checked in network tools, the update function creating unique network requests and I'm sure that's why PowerApps throwing this error.

I need help on this 🙏

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @AnkitShah55 ,

Firstly, the item limit for collections (in one collect function is 500 and can be set to 2000 maximum (in Advanced Settings), so I am not sure you have a scalable solution, however I threw together some code below (I cannot test it) as a syntax you might try to get it all in a collection.

ClearCollect(
   col1,
   RenameColumns(
      list1,
      "EqID",
      "Equip"
   )
);
ClearCollect(
   col2,
   AddColumns(
      ShowColumns(
         col1,
         "Equip"
      ),
      "LastDate",
      Lookup(
         list2,
         EqID=Equip
      )   
   )
)

I have not struck your error specifically in your circumstance, but if you are trying to update hundreds of records in one piece of code, you need to refer to the throttling limits guide - and also some guidance on how to avoid this.

 

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.

@WarrenBelz 

Thank you sir but last function lookup creates 200 unique network requests, hence it gives same problem as update function.

PowerApps is creating 200+ unique requests captured in network monitoring tool.

@AnkitShah55 ,

Yes, hence the last reference - the first bit was just an alternate suggestion on your code.

The second document I linked made some suggestions, but you could also try to break the collection up by filtering it into two (or more) collections based on Equipment ID 1-100, 101-200 etc and using timers (OnTimerEnd) to launch the next Patch and start the next timer. This could actually solve your issue if you can do it. 

I do bulk updates another way (with SQL from Access linked directly to the SharePoint table) and have to filter them into batches to avoid being throttled.

Happy to assist further.

 

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.

@WarrenBelz The total loading time of both the collections is already greater than 10 to 15 seconds.

Code is in the OnVisible of first screen.

Until collections loaded, user will see a loading gif with label only, so putting a timer will delay it further, causing poor UX.

(Those collections are necessary before user can do anything in app)

 

Have already read both the reference links you provided before posting this topic.

I need a code or solution which significantly reduce network requests or reduce it upto some extent.

Just because of this issue app cannot be released to my team.

@mdevaney Hi, Can you help?

@AnkitShah55 ,

I will also tag @PowerAddict on this, but welcome to SharePoint (I assume this is what you have) and throttling.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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