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.
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
Thank you for this the security filter is now validating, but users signing in with no orgid are still able to see all data for all users with no orgID,
We are one step closer the logic of the filter is below
Note: This expression could impact performance.
ANY of these statements is true: ....1: (The value of column 'orgid') is equal to (One randomly chosen value from this list ( ............The list of values of column 'org id' ............from rows of table 'org IDs' ............where this condition is true: ((The value of column 'User email address') is equal to (USEREMAIL( ............))))) ....2: (The value of column 'Author contact email address') is equal to (USEREMAIL( ....))
Any further assistance would appreciated
Thanks again
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.
Awesome! Glad you got it working!
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |