Hi there,
I am creating an app for multiple inspectors, each with their own email address (created in STAFF sheet).
I then assign jobs to each of these inspectors.
Now I only want them to be able to see specific sites that have been assigned to them to inspect.
I have created a simple dropdown in a table using VALIDIF and have also created a SLICE using filter condition [engineer]=USEREMAIL()
My questions are:
Thanking you in advance
Does your SITES table have a column that contains a list of INSPECTORS that are allowed to access and interact with that site?
Don't use ValidIf but ShowIf. For the formula, you can use : contains([engineer],useremail())
This will work if your engineer column contains emails.
___
If you want to use user names in engineer column (like James Blake instead of jamesblake@s.com for ex) , which is more practical, what I suggest is that you create a table with the list of your users, let's call it "Users". Inside of this table, add at least theses columns : Email | User Name | Role |
Then manually create the rows for each users.
Once it's done get back to the editor and add the table in your data.
Then, edit the [engineer] column, set it to enumlist, and in suggested values put : Users[User Name]
Now, to restrict access to a slice, don't edit ValidIf but Show_If (wether it's for a view or a slice).
Then use this formula : contains([engineer],any(select(Users[User Name],[Email] = USEREMAIL())) )
If you have several Roles and want to show a slice/view to users with the assigned role, you can use the same formula, just replace [User Name] with [Role] and Useremail() with "nameoftheassignedrole"
User | Count |
---|---|
35 | |
30 | |
30 | |
20 | |
18 |