My filter doesn't seem to work very well and i don't know how to fix it.
I'm using powerapps to get all people in my departments. In order to do this, i have list with all the people and their respective department.
In order to get the user department and id i use the following filter:
Collect(colColab;Filter('DATABASECOLAB';Lower(Email) = Lower(User().Email)))
After that, in order to get all the people working in that department, i do the following filter:
Collect(colAgencias;Filter(EOColaboradores;IdEstrutura in colColab.IdEstrutura))
The problem is, with the following filter i get only a portion of the results instead of all of them.
If i put the filter of IdEstrutura by hand, (Ex: Collect(colAgencias;Filter(EOColaboradores;IdEstrutura = 1234)) ) it will get all the colabs, but using 'Collect(colAgencias;Filter(EOColaboradores;IdEstrutura in colColab.IdEstrutura))' (which it should be the same thing), gets me 4 people instad of all 7.
Any ideias how to fix this? Thank you
'in' isn't delegable on most of the data source types, especially Office 365 SharePoint. So if your data source has more than 500 records using IN for a filter will only get the ones that are in the first 500.
You can increase the delegation limit in the App settings to max 2000.
However please note delegation means Power Apps will load the first x (x - delegation limit) records in memory and then perform your query.
If you want to learn more about delegation
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Reza Dorrani, MVP
I have increase the delegation limit in the App settings to max 2000 but for some reason, it still doesn't show all.
Is there any workaround for this?
Increasing the delegation limit to 2,000 simply means that it will check the first 2,000 records in the data source. If you have more than that you still won't get complete results. You need to find a delegable way to do your Filter. That means you can't use "in". The typical workaround is to use StartsWith() instead.
Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.
Did you miss the call? Check out the Power Apps Community Call here.
We are excited to announce the Power Apps Super Users!
Check out our new profile badges recognizing authored solutions!