PowerApps. Need help with using Collect for a very large Sharepoint List

Brass Contributor

I created an App to help workers in accessing and adding to a very large Sharepoint List. 
I organized the data by creating a new field in the list (Logbook ID). Everytime a worker creates a new Logbook ID, they can easily create new list entries with the same ID so they are able to access that set of entries easily through the app. 

The problem is that we ran into an issue where the app wasn't showing the whole list. I think this is because GroupBy is not a delegating function. But I am using GroupBy in order to show the logbooks at the beginning so people can access the list via the Logbook ID. 

Number of Vehicles is basically how many list entries are in the same Logbook. 

My code for dealing with the SharePoint list uses ClearCollect in order to use any function I need within the app. 



    'Vehicle Entry Log'



Question 1: Is there a way to use GroupBy and other non-delegating functions in the app while still accessing the entire SharePoint List (instead of the app only collecting the first 500 entries, which is the limitation we have right now). 
If Not, Question 2: Is there a way to collect the most recent 500 entries within the list? We can deal with not being able to deal with older list entries, we just need it to collect the most recent items instead of oldest-to-newest. 

1 Reply
What I do is get everything into local collection, then you can do whatever you want without worrying about delegation. This way you get the filtered result then you can count that result from the collection.

Mine is static, so I have one for each count, but if you have dynamic, you might look at utilizing a ForAll(assuming you have less than 2000 logbook rows) and do a collect for each one into the same collection. Then you'll have that collection local to get your counts for your groupby or what not. I think this might work out.