Hi, I am struggling with privileges and security filtersโฆ
I want to give edit privileges to specific users and limit them to view related projects by using staff table,
but getting this error โTable does not allow this operationโ.
with the formulas
for privileges
LOOKUP(USEREMAIL(),"STAFF","EMAIL","PRIVILEGE")
for security filters
IN(LOOKUP(USEREMAIL(),"STAFF","EMAIL","PROJECTS"),[PRO
JECT])
I want
Morpheus to view all projects but READ_ONLY
Mr Anderson to view all projects and make ALL_CHANGES in all projects
TANK to view worlds and make UPDATES_ONLY
Trinity to view projects that she is related but READ_ONLY
Thank you allโฆ
Solved! Go to Solution.
So, I have worked around and noticed that, formula is actually working perfect when user sign in from the phone.
But in the preview pane in appsheet editor confused me giving error, bizarre!
LOOKUP(USEREMAIL(),"STAFF","EMAIL","PRIVILEGE")
Please provide a screenshot of this:
Hi, Steve, thank you for your attention.
I removed security filters to view if there is a problem with this expression. Even so โAre updates allowed?โ expression didโt workโฆ
@Atlas From the screenshot I observed there is no return mode (updates_only, read_only,โฆ)
In your Are updates allowed expression give the resultant on the right-hand side. I mean
SWITCH(LOOKUP(useremail(), โstaffโ, โemailโ,โprivilegeโ) = which update mode you want ex: โread_onlyโ., default mode)
Hi, thank you for taking your time, ,
I have a STAFF table and Iโve assigned return modes in this table in privileges column. So, there are already return modes assigned to USEREMAILโฆ
I am not sure that the return mode will take from your STAFF table. Instead, give a try AppSheet return mode on the right-hand side.
Iโm concerned your LOOKUP() expression might not be returning a value. To test, letโs try this instead:
ANY(
SELECT(
STAFF[PRIVILEGE],
(USEREMAIL() = [EMAIL])
)
+ {"READ_ONLY"}
)
@Steve, I have tried this now but this also gives the same results. Expression reads the privileges correct so the user can who has privileges to make ALL_CHANGES can edit and adds. But when hit the sync the applicasion giving the same error โTable โDATAโ does not allow this operationโ.
ANY(
SELECT(
STAFF[PRIVILEGE],
(USEREMAIL() = [EMAIL])
)
+ {"READ_ONLY"}
)
What happens if you set the entire expression to exactly this?
"ALL_CHANGES"
Unfortunately the result is same
โTable โDATAโ does not allow this operationโ
I would guess he permissions on your spreadsheet do not allow AppSheet sufficient access. You should probably engage support@appsheet.com for further help.
@Steve itโs excel file in my drive. Sorry but, I didโt understand what you mean
You should probably engage support@appsheet.com for further help.
So, I have worked around and noticed that, formula is actually working perfect when user sign in from the phone.
But in the preview pane in appsheet editor confused me giving error, bizarre!
LOOKUP(USEREMAIL(),"STAFF","EMAIL","PRIVILEGE")
User | Count |
---|---|
15 | |
12 | |
9 | |
8 | |
4 |