Hi All,
Is there a way we can show app views to users based on their roles. I have two tables namely Roles and User Roles.
Roles table has two columns (Role Id and Role Name)
User Roles has (User Id , Name , Email , Role Id(ref from Roles) as columns.
Can you advise expression I can use to filter the app views based on the User Roles Table.
Many Thanks
Hi Steve,
Thanks for sharing the links but unfortunately I am still struggling to get it done. I tried to put an expression in the security filter โSHOW_IFโ but it didnโt work.
FILTER( "User Roles", AND( ([Role Id] = "1"), ([Email Id] = USEREMAIL()) ))
Can you advise what I am doing wrong in the above expression?
Many Thanks
The Show? expression must produce a Yes/No result, but your expression produces a List result. The expression youโre using:
FILTER(
"User Roles",
AND(
([Role Id] = "1"),
([Email Id] = USEREMAIL())
)
)
answers the question, โwhich rows in User Roles have a Role Id column value of 1
and an Email Id column value matching the current userโs email address provided by USEREMAIL()?โ The question you want the answer for Show? is, โare there any rows rows in User Roles that have โฆ?โ To do that, just wrap your expression in ISNOTBLANK():
ISNOTBLANK(
FILTER(
"User Roles",
AND(
([Role Id] = "1"),
([Email Id] = USEREMAIL())
)
)
)
See also:
Hi Steve,
Thanks for helping out. The issue is resolved. Is there a way we can limit the data to users as per their company ids. For instance, User with Company Id 1 can only view / update / add the sales made by that respective Company (with Id 1).
Please advise.
Thanks again for your support
Hi @Sam_Bhullar
Please have a look to this article, that may be what you are looking for:
User | Count |
---|---|
39 | |
28 | |
23 | |
23 | |
13 |