I have a number of customers in one table and i want only certain users to view particular customers on a dropdown list. How can I achieve that?
Solved! Go to Solution.
First you would need someway to identify which customers a user can view.
Let’s say you have a column in your Customers table named Users in which you place the list of users who can view that customer. Define this column in AppSheet as an EnumList
I’ll assume your users are logging in and therefore you know their login email address. Place the users email address in the Users column separated by a comma (if more than one user).
Now, in the column for the dropdown, likely a Ref column, update the Valid_If property to this expression:
SELECT(Customers[<<key column>>], IN(USEREMAIL(), [USERS]))
Replace <<key column>>
with the column in the Customer tables being used as the key. In case you are not aware, the USEREMAIL() function returns the email of the logged in user.
I hope this helps!!
First you would need someway to identify which customers a user can view.
Let’s say you have a column in your Customers table named Users in which you place the list of users who can view that customer. Define this column in AppSheet as an EnumList
I’ll assume your users are logging in and therefore you know their login email address. Place the users email address in the Users column separated by a comma (if more than one user).
Now, in the column for the dropdown, likely a Ref column, update the Valid_If property to this expression:
SELECT(Customers[<<key column>>], IN(USEREMAIL(), [USERS]))
Replace <<key column>>
with the column in the Customer tables being used as the key. In case you are not aware, the USEREMAIL() function returns the email of the logged in user.
I hope this helps!!
Thank you. It works
User | Count |
---|---|
43 | |
26 | |
23 | |
14 | |
11 |