PowerApps - Get more than 2000 items from Data source
Every time while working with PowerApps with large data sets I can see the delegation issue and get only 2000 items. By default PowerApps supports only 500 items. We can set the items until 2000 in the PowerApps setting by navigating Settings of the Power Apps and set “Data Row Limit” to 2000 as below.
But working with more than 2000 records is always issue in
Power apps due to delegation limitation. For that I have used simple function
using Concurrent as below. Concurrent function will run multiple functions
concurrently.
Using following logic, I got multiple items (for my case it
is 10000 records in the SharePoint Lists item. I have used following function
to get the items
Concurrent(
ClearCollect(Collection1To2000,Filter(SharePointListName,ID<2000)),
ClearCollect(Collection2000To4000,Filter(SharePointListName,ID >=2000 And ID<4000)),
ClearCollect(Collection4000To6000,Filter(SharePointListName,ID >=4000 And
ID<6000)),
ClearCollect(Collection6000To8000,Filter(SharePointListName,ID >=6000 And
ID<8000)),
ClearCollect(Collection8000To10000,Filter(SharePointListName,ID >=8000 And
ID<10000))
)
Collect all the collections above to single collection.
ClearCollect(FinalCollection, Collection1To2000, Collection2000To4000, Collection4000To6000, Collection6000To8000, Collection8000To10000)
Comments