Thank you all...
Crucial information for me is that SharePoint ID only support equal '='!!! as @cwebb365 write in his post.
Finally, my solution is:
- Add column to my list - TempID (not calculated field because don't work)
- With PowerShell I copied ID to TempId (almost 12 hours to finishe coping 33K items)
- Change my app to support managing TempID (only for new items app need to patch TempID)
- Use this code for OnStart app (combine @hnguy71 and of course Mr Dang)
ClearCollect(HundredChart,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]);
Set(g_recFirstRecord,First(Categorisations));
Set(g_recLastRecord,First(Sort(Categorisations,ID,Descending)));
Set(g_numMaxIter,RoundUp((g_recLastRecord.ID-g_recFirstRecord.ID)/2000,0));
ClearCollect(colIter,
AddColumns(AddColumns(Filter(HundredChart,Value<=g_numMaxIter),"min",
(Value-1)*2000+g_recFirstRecord.TempID),"max",Value*2000+g_recFirstRecord.TempID));
Clear(colCategorisation);
ForAll(colIter,Collect(colCategorisation,Filter(Categorisations,TempID>=min&&TempID<max)))
This solution WORKS form me. Actually I have list with 33.659 SharePoint Items with 3 columns + systems columns and solutions collect all items for 30-40 seconds!!! In my case this time is acceptable.
If anyone need Powershell code I will share it, just ask.
Thank you again.