Access to views based on condition

Hi everyone. I recently posted about a similar topic which I thought had solved my Problem but now I have gotten rather stuck again.

IN(LOOKUP(USEREMAIL(), "UserManagement", Email,Role), LIST("Site Head" "NY"))

I am trying to use this expression to limit the users that can see certain views based on custom roles I gave them in an external UserManagement table. The function works if the user has exactly the required roles but if as an example I also want the admin to be able to see the view I thought I would need to add an OR(). So I came up with this second expression.

OR(IN(LOOKUP(USEREMAIL(), "UserManagement", Email, Role), LIST("Site Head", "NY")), IN(LOOKUP(USEREMAIL(), "UserManagement", Email, Role), LIST("AppAdmin")))

This should, if I'm not completely mistaken in the way the functions work, allow anyone who has the roles "Site Heah" and "NY" or the role "AppAdmin" to see the view. Still however didn't work. Any tips would be greatly appreciated! Thanks in advance.

1 4 89
4 REPLIES 4
Top Labels in this Space