LOOKUP(USEREMAIL() Table does not allow this operation

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โ€.

STAFF TABLE

with the formulas

for privileges
LOOKUP(USEREMAIL(),"STAFF","EMAIL","PRIVILEGE")

for security filters
IN(LOOKUP(USEREMAIL(),"STAFF","EMAIL","PROJECTS"),[PROJECT])

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โ€ฆ

@LeventK @Steve

Solved Solved
0 13 1,107
1 ACCEPTED 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")

View solution in original post

13 REPLIES 13

Steve
Platinum 4
Platinum 4

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โ€ฆ

Error "Table does not allow this operation"

@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")

Top Labels in this Space