"Updates allowed" expression based on ref list

I wan to add an expression inside a "Are updates allowed?" field. 
In particular, I want to enable the changes to all users that have a 
particular Role (see picture below).

My expression should be something like:

 

IF(IN(USEREMAIL(), "email of users having a role = "super user"")

 

How can I convert the second part into an expression based on the structure below?

Here my "user" structure.

DroidTeo_0-1664487165423.png

 

0 5 74
5 REPLIES 5

 

LOOKUP(
 USEREMAIL(),
 "User",
 "email",
 "Userrole"
)
=
"super user"

Be sure to match the column names to the actual ones in the User table!

 

@TeeSee1 but the roles are inside another table.. and this table is a Ref inside the user table 

Here the expression:

LOOKUP(
 USEREMAIL(),
 "Users",
 "email",
 "Related UsersRoles"
)
=
"super user"

and using that expression, I obtain: 

 

Cannot compare List with Text in (ANY(SELECT(Users[Related UsersRoles],([email] = USEREMAIL()))) = "super user")

 

IN(
 "super user",
 LOOKUP(
  USEREMAIL(),
  "Users",
  "email",
  "Related UsersRoles"
 )
)

This will work only if the key column of UsersRoles has text "super user". 

It would help to see the whole definition of UsersRoles

([id], [userrole], [ref to user] would be my guess...)

This is the structure of the UsersRoles table:

DroidTeo_0-1664531097807.png

and then inside the users table I have 

DroidTeo_1-1664531123508.png

IN(
 "super user",
 SELECT(
  USERROLES[Roles],
  [Users] = LOOKUP(USEREMAIL(), "users", "email", "user key")
 )
)
Top Labels in this Space