I am trying to restrict rows in a Locations table to
A. Any User with an โAdminโ [Role] OR
B. The user that the record/ row is [assigned to] = USEREMAIL()
When just using [Assigned To] = "USEREMAIL() it functions as expected. However when adding OR to include if the userโs role includes โAdminโ the entire expression seems to have no effect. The record appears to always be visible.
In the security filter of the Location table Iโm using: OR(IN(Admin, Users[Role]), USEREMAIL() = [Assigned To])
I have a table USERS with [role] (enum of โAdminโ or โDriverโ selections)
Any thoughts? I read thru the documentation which is how I came up with the expression Iโm using. It was the example for the problem Iโm trying to solve.
It seems to be showing the view because โAdminโ is in the enum as a choice but I want it to show only if โAdminโ is selected.
Solved! Go to Solution.
@Steve I think this accomplished my goal:
OR(USEREMAIL() = [Assigned To],IN(LOOKUP(USEREMAIL(), Users, Email, Role), LIST(โAdminโ)))
This is TRUE if Admin
occurs in the Role column of any row in the Users table.
Thank you Steve. Iโm restricting the rows of the table to the user whose email matches the [Assigned To] field but want an Admin to be able to see it. Is the security filter at the table level not the place to accomplish this?
@Steve I think this accomplished my goal:
OR(USEREMAIL() = [Assigned To],IN(LOOKUP(USEREMAIL(), Users, Email, Role), LIST(โAdminโ)))
User | Count |
---|---|
40 | |
36 | |
34 | |
23 | |
17 |