How to avoid delegation issues and get all records?
The documentation is very clear in stating to not use functions or datasets that do not support delegation.
It is very hard though when you are trying to build apps that must use these certain functions specifically that do not support delegation.
I ran into this issue when I wanted to load all records and at the same time join a table.
As it turns out the functions for joining do not support delegation on the returned record set:
They support delegation when they look at the reocords but not when they return them to you, so you only get the limit specified in PowerApps setting.
I found the solution is to not use any of these functions and set the app setting to 1 record like their documentation specifies. If you only get one record this tells you do not use such function.
So this is how I get a gallery joined with another table and I'm able to see all records with my app setting set to 1.
1. Load the gallery with a single table with functions that have no delegation restrictions.
SortByColumns and Filter appear to be some of the few functions without restrictions.
Filter(Ops_Audits_Employees, createdon > DateAdd(Today(),-180, Days))
, "createdon", Descending)
All records show regardless of app setting. This means there are no delegation restrictions.
2. Join any related table data
Since we can't join the table data on the source, the best thing to do is join it in the gallery.
This allows us to work on one gallery record at a time therefore eliminating the worry of the delegation limits.
Add blank labels to your gallery where you will display the joined / related fields
Now simply display the value for the field related by your relationship column or field ID
Since we are only comparing on one gallery record at a time, delegation limits won't affect this "join / look up"
My related field text will display the following:
Concat(Filter(Ops_Audits_Tables, Ops_Audits_Table = GUID(ThisItem.'Ops Audits Table ID')),jobType)
The value of the related field based on matching related ID
If you needed to update or delete any records you have easy access to the main table IDs and related table IDs.
So this gives you a solution to the most important part of any app - being able to see all your records with related tables and such.
3. Display all related records of a single parent table
This one is the same as using a Filter to display records based on related ID which does not require of any delegation restricted functions
It is simply the filer function .... example
'Ops Audits Table ID' = glyAuditList_1.Selected.crf61_ops_audits_table_id
And employeeID = glyAuditList_1.Selected.crf61_employeeid)
I'm relating it on the selected gallery item.
Solved! Go to Solution.
Check it out!
Check out whats happening in Power Apps
FIll out a quick form to claim your community user group member badge today!
Features releasing from October 2020 through March 2021