- Create a new column in the SP list called NewID (type: Number) which copies data from the ID field.
- Add to AppStart property of your app
Set(LastRowID,First(Sort(YourListName,ID,SortOrder.Descending)).ID);
Set(BatchSize,1000);
Set(PageCount,RoundUp(LastRowID/BatchSize,0));
ClearCollect(
colSeq,
AddColumns(RenameColumns(
Sequence(PageCount,0,BatchSize),
Value,
Start
), End, Start + BatchSize
)
);
Clear(colAllItems);
ForAll(
colSeq As StartEnd,
Collect(colAllItems,
Filter(YourListName,NewID > StartEnd.Start && NewID <= StartEnd.End
)
)
);