I've created a simple app to manage annual leave which which stores its data in a SharePoint list. I need to be able to provide a view for managers so they can see all of their direct reports leave. To do this I've first created a collection called MyReportsCollection using Office365Users.DirectReports() to store their direct reports.
I then initially planned to join this onto my SharePoint list to return only the leave relating to the current users direct reports (I do not want to bring all of the data into the app to then filter it). However I understand there is no join function so I've resorted to using the below function which works fine.
Where "CreatedByO365UserId" is the office id of the user who created the item which is stored in the list and
"Id" is the office id of the user in MyReportsCollection.
Basically, I am trying to understand if this is being deletgated or if all of the list data is being returned to the app and then filtered. I understand filter is delegable but don't know if the addition of AddColumns is collecting it into the app first.
If anyone can help provide an answer on this or an alternative method which would prevent me from bring a large amount of data into the app it would be much appreciated.
It looks like the AddColumns function can't be delegated so I am assuming all of the list data (500 items max?) is being brought back into the app before the calculation is applied? What is strange is that I do not receive a blue dot in the PowerApps designer to inform me of this.
I have raised an Idea here requesting join functionality that can be delegated.
The join functionality should really be covered by the 'in' operator. According to this documentation it is not currently delegated for SharePoint, so it would not solve your issue anyway.
In any case, indeed strange that you are not receiving the blue-dot suggestion.
Are you able to filter across all your data source (i.e. more than the first 500 rows)? May the operation is delegated now and the documentation is simply not up to date.
Thanks @Meneghino, I was not aware of the "in" operator. I've written the below function and receive the blue indicator saying "Part of the formula cannot be evaluated remotely, right side of "in" operator is not a column name". It does actually work and I receive the results I expected.
ClearCollect(NewCollection,Filter(SharePointList, CreatedByO365UserId in MyReportsCollection.Id))
My data source is currently small as I'm still testing the app but I would probably need to create some test data with a few thousand records to check if my original function captures all results.
We're excited to announce our first cross-community 'Can You Solve These?' challenge!
Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.
We are excited for the next Super User season.
FIll out a quick form to claim your community user group member badge today!
Features releasing from October 2020 through March 2021