Hello,
- I have an app with following total of 4 views: Inventory, Orders, RMA, Dashboard.
- I have a table with following structure.
| UID | Username | USEREMAIL | Access to Views |
|---|---|---|---|
| 1 | User1 | User1@email.com | Inventory |
| 2 | User2 | User1@email.com | Orders , RMA |
| 3 | User3 | User1@email.com | ALL |
- I would like to put an expression in the "Show if: constraint for each view where it checks if the logged in user has access to the view defined in the table above. For example User1 only should see the Inventory View, User2 should see both Orders and RMA views and User3 should see ALL views. I am trying to write an expression that will reference each view and show if allowed access in the Access to Views column. I do not want to hard code the View names in the expression so in case the view name changes, it automatically checks view names. Here is what I came up with, but it is not working:
ISNOTBLANK(
FILTER(
“RBAC”,
AND(
[Email]=USEREMAIL(),
OR(
IN(“ALL”,[Access to Views]),
IN(CONTEXT(View)), [Access to Views])
)
)
)
)