Expression USEREMAIL()

doubts
New Member

How can I limit the display of some data based on the userโ€™s role? I used an expression in which to filter based on a function, but I need it to be based on 3.

I used this expression: LOOKUP(USEREMAIL(), user, email, function) = โ€œuser roleโ€

0 4 186
4 REPLIES 4

So I normally create a user table which stores the user name, login email address and role. Then in an app you can use something like to allow only admins & managers to do/see something

OR(
ANY(Select(Usertable[UserRole],[LoginEmail]=UserEmail()))=โ€œAdminโ€,
ANY(Select(Usertable[UserRole],[LoginEmail]=UserEmail()))=โ€œManagerโ€
)

me returns this error

Only one table scan instead of two:

ISNOTBLANK(
  FILTER(
    "UserTable",
    AND(
      (USEREMAIL() = [LoginEmail]),
      IN([UserRole], {"Admin", "Manager"})
    )
  )
)

doubts
New Member

I adapted the expression and it worked. Thanks

adapted function:

or(
lookup(UserEmail(), user, email, function) = โ€œAdminโ€,
lookup(UserEmail(), user, email, function) = โ€œManagerโ€ )

Top Labels in this Space