Hi,
Normally I filter my sp list in browsegallery like so - 'Assigned to'.Email = User().Email
Assigned to is a person field
but what do I do if I want to find a user in a person field that allows selection of multiple people? Is there any limitations to this?
i want to do something like this -
Filter([@testme_1],
('Assigned to'.Email = User().Email Or User().Email in ShowColumns('Delegated to1', "Email") Or User().Email in ShowColumns('Delegated to2', "Email") Or User().Email in ShowColumns('Delegated to3', "Email") Or User().Email in ShowColumns('Delegated to4', "Email") Or User().Email in ShowColumns('Delegated to5', "Email"))
But showcolumns doesnt really work I notice.
Certainly! Prefiltering is a great way to make your query partly delegable. As a small addition (optional), I prefer to add a With function and some inline comments to improve code readability - especially should the complexity increase later on.
With(
{
//Prefilter via delegable condition (Output should not exceed Data Row Limit)
wPrefilter: Filter(
[@testme_1],
Status = "In Progress" || Status = "NOT STARTED"
)
},
//Apply non-delegable conditions on prefiltered dataset
Filter(
wPrefilter,
'Assigned to'.Email = User().Email || User().Email in 'Delegated to1'.Email ||
User().Email in 'Delegated to2'.Email Or User().Email in 'Delegated to3'.Email || User().Email in 'Delegated to4'.Email || User().Email in 'Delegated to5'.Email
)
)
As a small note, the prefilter output should not exceed your Data Row Limit.
I hope this helps!
@LaurensM thanks
Can I do something like this -
Filter(Filter([@testme_1],
(Status = "In Progress" Or Status = "NOT STARTED")),
'Assigned to'.Email = User().Email || User().Email in 'Delegated to1'.Email ||
User().Email in 'Delegated to2'.Email Or User().Email in 'Delegated to3'.Email || User().Email in 'Delegated to4'.Email || User().Email in 'Delegated to5'.Email
You could use one of the following workarounds:
If you don't want to use an indirect workaround, you may have to limit the data via a delegable query first. There are several options your could use, one example could be only displaying the records within a certain month or year (can be changed via a dropdown). This would be used as a prefilter to limit the amount of records returned.
I hope this helps!
@LaurensM thanks! but i have more then 2k rows! what can I do?
Hi @wonka1234,
You can use the following approach: 'User().Email in PersonColumn.Email'
Filter(
[@testme_1],
'Assigned to'.Email = User().Email || User().Email in 'Delegated to1'.Email ||
User().Email in 'Delegated to2'.Email Or User().Email in 'Delegated to3'.Email || User().Email in 'Delegated to4'.Email || User().Email in 'Delegated to5'.Email
)
Please note that this approach is non-delegable because of the 'in' operator. Your list should not exceed your Data Row Limit (see app settings, default 500 - max 2000).
If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.
Thanks!
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional