Hello Everyone,
I have an App based on SharePoint List (Name: Departments) which is only having three columns with information like below.
Title (Single Line Text) | Email (Single Line Text) | Role (Choice) |
User 1 | User1@email.com | IT |
User 2 | User2@email.com | Sales |
User 3 | User3@email.com | Purchase |
In the PowerApps Application i have added a gallery. I have added a text input box and i want that the gallery should be filtered to the any entered criteria from the above demo list. For Example, i may type User 1 then i should all items for User 1, if i enter IT then i should get all the users from IT and so on. When the field is blank i should get all the items in the gallery. I came to know that 'Search' having some limitations and i tried using filter as below code but it is not working.
Filter(Departments, FilterBox.Text in Title)
** The list will be having only 200 records max, hence the delegation warning can be ignored. Can anyone please help how to achieve this?
Many Thanks,
Akshay
Solved! Go to Solution.
Hi @AkshayManke ,
If you will always have list numbers under your Delegation limit and want to get rid of the warning (as well as achieve what you need) try this (NOTE if the list numbers are over your limit it will only work for that number and you will not get a warning)
With(
{wDept:Departments},
Filter(
wDept,
If(
IsBlank(FilterBox.Text),
true,
FilterBox.Text in Title ||
FilterBox.Text in Email ||
FilterBox.Text in Role.Value
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @AkshayManke ,
The in Filter is not Delegable (nor is Search), hence the restriction you have. The With() statement does nothing more than "collect" the items (subject to the delegation limit) before the filter, so the subsequent statement is Delegable.
There are a couple of approaches - I have done a blog on Delegation and the "big collection" item may be a path and also in a related one on using the With() statement to manage Delegation the the item at the end (which I use regularly) will collect up to 4,000 items (including those matching a delegable filter).
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @AkshayManke ,
If you will always have list numbers under your Delegation limit and want to get rid of the warning (as well as achieve what you need) try this (NOTE if the list numbers are over your limit it will only work for that number and you will not get a warning)
With(
{wDept:Departments},
Filter(
wDept,
If(
IsBlank(FilterBox.Text),
true,
FilterBox.Text in Title ||
FilterBox.Text in Email ||
FilterBox.Text in Role.Value
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hello @WarrenBelz,
I tried your solution and it worked exactly as expected. Many Thanks for the help on this.
Just a question: Which approach/code i should use if the items are going to increase than the limit?
Regards,
Akshay
Hi @AkshayManke ,
The in Filter is not Delegable (nor is Search), hence the restriction you have. The With() statement does nothing more than "collect" the items (subject to the delegation limit) before the filter, so the subsequent statement is Delegable.
There are a couple of approaches - I have done a blog on Delegation and the "big collection" item may be a path and also in a related one on using the With() statement to manage Delegation the the item at the end (which I use regularly) will collect up to 4,000 items (including those matching a delegable filter).
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
204 | |
93 | |
84 | |
47 | |
42 |
User | Count |
---|---|
251 | |
104 | |
104 | |
62 | |
57 |