Hello,
I am trying to write an expression that will determine who can see what views. I have a table called RBAC that has columns for User Email and Views they can see. For example:
User Email | Views
xxx@gmail.com | Contacts
yyy@gmail.com | Contacts, Deals
zzz@gmail.com | ALL
aaa@gmail.com | RBAC
User xxx should only see Contacts view, user yyy should see two views (Contacts & Deals), user zzz should see all three views and user aaa should only see RBAC view. Below is the expression I wrote in โShow Ifโ of all three views (Contacts, Deals, RBAC); however, I can only see view if I select โALLโ, otherwise the views disappear. If I replace CONTEXT(โViewโ) with the name of the view it works fine, but I wanted the ability to just use the expression for Show If for all views rather than update the expression with each Viewโs name.
ISNOTBLANK(
FILTER(
โRBACโ,
AND(
[Email]=USEREMAIL(),
OR(
IN(โALLโ,[Views]),
IN(CONTEXT(โViewโ), [Views])
)
)
)
)
Any help would be greatly appreciated.
Thank you
@Yogesh_Patel
Try with this expression in the Show_If property of each UX View:
IF(
CONTAINS(
SPLIT(
LOOKUP(
USEREMAIL(),
"Users",
"User Email",
"Views"
),
","
),
"ALL"
),TRUE,
CONTAINS(
SPLIT(
LOOKUP(
USEREMAIL(),
"Users",
"User Email",
"Views"
),
","
),
CONTEXT("View")
)
)
Hi Levent,
I got the same message. โThis formula is not evaluated in the context of a row, so column values are not available.โ
Thanks,
Yogesh
User | Count |
---|---|
43 | |
30 | |
24 | |
23 | |
13 |