I won't include the whole of my app/db details but hopefully enough so that you get the gist of what I'm trying to do.
I have two tables (using Azure Sql),
Id: int Name, Email, etc.
Name, email, etc.
I have a collection of Contacts (colContacts) and I want to get the PAs (colPAs) for each of these contacts. I want to achieve this in a single call to the database, rather than use a ForAll. This is the line of code I am trying to use:
Also, regarding the delegation, please update your settings as:
File -> App Settings -> Advanced Settings -> Look for Data Rows Limit for Non-Delegable queries -> Update this to 2000.
If you have less than 2000 rows then the warning will go away.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
How many records stored in your PA Table? More than 2000?
Do you want to filter your PA Table records based on the colContacts?
Based on the needs that you mentioned, I think the second formula you provided could achieve your needs.
If the amount of your PA Table records is not more than 2000, I think you could ignore this Delegation warning issue. Please consider set the "Data row limit for Non-delegable queries" option to maximum value -- 2000 within the Advanced settings of App settings of your app, then you could process 2000 records locally at most in your app, then try your second formula again, check if the issue is solved.
More details about the Delegation in PowerApps, and how to change the limit, please check the following article: