Hi I have an expression in a security filter that tests correctly at first but doesnt work with the app is loaded in preview, can anyone find something that is wrong with this expression? Maybe there is something else I am missing.
The set up:
First condition ; Does the dept have a match in the list of assigned depts from the user list table?
Already solved by @Suvrutt_Gurjar thank you very much.
Second condition: Does the enumlist field Projects intersect with the assigned projects enumlist field from the user list table by giving a count of more than zero. I am using the same approach with split because Projects in an enumlist with multiple selections possible.
AND(IN([Dept],
SPLIT(TEXT(SELECT(User List[Assigned Depts], [Email] = USEREMAIL())))),
(COUNT(
INTERSECT(SPLIT([Projects],","),SPLIT(TEXT(SELECT(User List[Assigned Projects], [Email] = USEREMAIL())),","))
) > 0))
Solved! Go to Solution.
In general, please try to have simpler expressions for security filters.
I think you are trying the following expression
AND(
IN( [Dept],
SPLIT( TEXT(SELECT(User List[Assigned Depts], [Email] = USEREMAIL())), " , ")
) ,
ISNOTBLANK( INTERSECT( [Projects] ,
SPLIT( TEXT(SELECT(User List[Assigned Projects], [Email] = USEREMAIL())), " , ")
)
)
)
Will again request you to try the Current_User Tip that I referred in the previous post by you. That will help you simplify the expressions.
In general, please try to have simpler expressions for security filters.
I think you are trying the following expression
AND(
IN( [Dept],
SPLIT( TEXT(SELECT(User List[Assigned Depts], [Email] = USEREMAIL())), " , ")
) ,
ISNOTBLANK( INTERSECT( [Projects] ,
SPLIT( TEXT(SELECT(User List[Assigned Projects], [Email] = USEREMAIL())), " , ")
)
)
)
Will again request you to try the Current_User Tip that I referred in the previous post by you. That will help you simplify the expressions.
Thanks again
You are welcome.
User | Count |
---|---|
18 | |
11 | |
11 | |
8 | |
4 |