Hi
I am trying to create a security filter to achieve the following
Scenario one
The APP user is part of an organisation and has a org ID in the ORG ID table this allows all users with same org ID to see all the companies data in the app,
[orgid]=LOOKUP(USEREMAIL(), "ORG IDS", "User email address", "org id")
Scenario 2
If the app is being used by a single user with no org ID they will only see the data matching there user email
[Author contact email address]=USEREMAIL()
both filters work independently across different apps but when combined I get the following error
Condition OR(([Author contact email address] = USEREMAIL())) has an invalid structure: at least 2 subexpression(s) required
The combined filter looks like this
OR(
[Author contact email address]=USEREMAIL()
AND(
[orgid]=LOOKUP(USEREMAIL(), "ORG IDS", "User email address", "org id")
)
)
Any Help would be great
Thanks in advance
Solved! Go to Solution.
The error Condition OR(([Author contact email address] = USEREMAIL())) has an invalid structure: at least 2 subexpression(s) required is because the expression OR([Author contact email address]=USEREMAIL()AND([orgid]=LOOKUP(USEREMAIL(), "ORG IDS", "User email address", "org id"))) is missing a comma to separate the two OR conditions but it looks like you used an AND instead. Try:
OR([Author contact email address]=USEREMAIL(), [orgid]=LOOKUP(USEREMAIL(), "ORG IDS", "User email address", "org id"))
Hi Lynchk21
I continued playing with the security template you suggested,
OR([Author contact email address]=USEREMAIL(), [orgid]=LOOKUP(USEREMAIL(), "ORG IDS", "User email address", "org id"))
as per the reply that has not been approved yet, users with no orgID could see all data for all single user with no orgID
based on your suggested filter I tried changing OR to AND
AND([orgid]=LOOKUP(USEREMAIL(), "ORG IDS", "User email address", "org id"),[Author contact email address]=USEREMAIL())
and it now works.
Thank you with out the correct filter structure I would have been hitting a wall for days to come.😁
Thanks again.
User | Count |
---|---|
15 | |
12 | |
9 | |
8 | |
4 |