Dropdown list in table based on a slice USEREMAIL

PG3
Bronze 1
Bronze 1

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:

  1. How do I modify the VALIDIF dropdown list to only expose/show the SITES that are assigned to the specific inspector signed in to the app (USEREMAIL)
  2. Do I have to create a whole new dropdown

Thanking you in advance

0 2 80
2 REPLIES 2

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"

 

Top Labels in this Space