I have looked all over and maybe I am missing the correct post I need to figure out this problem. I have a table named Main with all the employee's listed in there, the fields are : ID, Name, Site, Gender, Phone, email, related sales, related service
I have another table names Users with the Manager people information. The table is Username (useremail()), Role, Site, Manager
I want to filter the records based on site they have and if they are a manager and I got the individual filters to work which are
lookup(useremail(),users, email, manager) = Y - This filters out everyone that is not a yes in Manager column
ANY(SELECT(users[Site],USEREMAIL()=[email])) - this is correct to me but is not a Y/N
I tried combining them and putting them in a Security Filter but it keeps giving the error about not a Y/N, that filter looks like this:
OR(lookup(useremail(),users, email, Manager) = Y, ANY(SELECT(users[Site],USEREMAIL()=[email])))
It does not work but maybe my code is wrong or I am placing the code in the wrong area.
What I am trying to do is give anyone with the Manager = Y full access to the data and anyone with the Manager = N access to only the sites they are assigned to. Thank you in advance.
Solved! Go to Solution.
What about this ?
OR(
LOOKUP(USEREMAIL(),"users", "email", "Manager"),
LOOKUP(USEREMAIL(),"users", "email", "Site")=[Site]
)
What about this ?
OR(
LOOKUP(USEREMAIL(),"users", "email", "Manager"),
LOOKUP(USEREMAIL(),"users", "email", "Site")=[Site]
)
That worked great! Thank you so much!!
Please post a screenshot of the entire Expression Assistant window that includes the expression and the error message.
User | Count |
---|---|
32 | |
31 | |
30 | |
19 | |
17 |