Select not behaving as excepted

AndyV
New Member

When I use the following it throws an error.

SWITCH (USEREMAIL() ,
“use 2@gmail.com”, “ALL_CHANGES” ,
user1@gmail.com”, “UPDATE_ONLY”,
“READ_ONLY”

0 5 186
5 REPLIES 5

Steve
Platinum 4
Platinum 4

You should probably fix the error.

I fixed the error. It was an ) at the end of the expression.

Now the expression turns greeen but when I save it the error is

invalid security filter ‘=SWITCH (USEREMAIL() , “user2@gmail.com”, “ALL_CHANGES” , “user1@gmail.com”, “UPDATE_ONLY”, “READ_ONLY”)’. Filter must return true or false.

Why does it say function is OK and then I get the above.

Your expression is valid, but doesn’t produce the type of result expected. The green checkmark indicates structural validity, but doesn’t confirm the result type.

Your expression as written is suited for use in the table’s Are updates allowed? expression rather than in a security filter

AndyV
New Member

Steve,

I am trying to allow one user, user1@gmail.com to access the app. User1 can Update, Add and Delete.

Other users can only view.

How can I set up appsheet to do this?

Andy

See this post:

Top Labels in this Space