I have a list of less than 4000 items on SharePoint Online.
I need to show today's items so I use IsToday function: Filter('Visit Records',IsToday(ServiceDate))
It does not shows anything and says "Delegation warning"
So I tried using LastN and also FirstN but the output is limited to a short priod of time: SortByColumns(LastN('Visit Records',10000),"ServiceDate",Descending)
And I have tried complete syntax, but it returned an empty gallery: Filter(LastN('Visit Records',10000),IsToday('Visit Date'))
Also increasing the row limit to maximum which is 2000 and no success.
Please let me know if there's any solution.
Solved! Go to Solution.
I have found that to have greater flexibility in my criteria against data in a sharepoint list I collect it into a local collection to start with then from their can apply the filters. I can see this would have some limitations as the data could quickly get out of sync but so far this has been working.
If you can avoid the local collections...you are much better off. There are some issues with keeping things "connected" properly that you will need to provide formulas to do throughout your App.
So, the reality is (as discussed in other posts about delegation), you really want your datasource to give you the results you need. This is not possible with SharePoint for many reasons. In fact, it's not possible with SQL either, but in SQL you can create views and functions that will assist with it...in SharePoint, you cannot. BUT, you can take steps in "preparing" your SharePoint list for PowerApps so that you can take advantage of those things which CAN be delegted. For date, this is quite simpe to do.
You might take a look at this recent post in which this exact subject was discussed.
Yes, this should be used only when necessary. Otherwise you will deal with the complexities of "syncing" your collection and the SharePoint all the time. Plus, you lose the "real-time" aspect of things like Galleries and Tables and such. You end up having to Patch/Update/Submit to both your Collection and the SharePoint, or take the penalty of "refreshing" your Collection.
Always a good idea to prep the datasource (SharePoint list in this case) as much as possible to get what you need with delegation.
Not always possible, but go that road first before applying collections everywhere.
As always - Your mileage may vary.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.