As a newer appsheet user, I and not having su...

expressions
#1

As a newer appsheet user, I and not having success using the “Are updates allowed?” setting with the Expression Assistant for tables.

If I modify the example expression something like below (with my email replacing "myemail@mydomain.com"), I would expect when I am using the app I can edit a record, but all others are read-only.

What is happening is, nobody can edit the records.

SWITCH(USEREMAIL(),

"myemail@mydomain.com", “ALL_CHANGES”,

“READ_ONLY”)

Has anybody got this working?

Is it possible that USERMAIL() does not work if the app is not yet deployed?

Any advice appreciated!

(Praveen Seshadri (AppSheet)) #2

@Mike_Adler, that looks generally right. I wonder if this is an uppercase/lowercase issue with your email address. Could you add two virtual columns to test this:

a) with the formula USEREMAIL()

b) with the exact same expression you have there above … SWITCH(…)

#3

@praveen - I will try that and report back the results.

Thanks for the idea (still learning)…

#4

@praveen - I tested it as you suggested and the results worked!

Works as intended now (not sure why but thanks for the testing approach).

I suspect the issue was I was using the emulator screen to test.

This meant I was not logging in and out properly across accounts to accurately test the security changes.

Adding the virtual fields allowed me to check the values more accurately.

thanks again!

#5

Even better for my use case is to use the new USERROLE() property.

Very nice addition!!

SWITCH(USERROLE(),

“Admin”, “ALL_CHANGES”,

“READ_ONLY”)

@praveen - Now I just wish

appsheet leveraged the google “Add Account” capability when logging in, so we could rapid switch users during development.

I can always dream!!

(Praveen Seshadri (AppSheet)) #6

@Mike_Adler, I think you can do that. When you sign in to AppSheet using Google, you see Google’s signin screen. That let’s you switch between Google accounts (and even Add Account, if I’m not mistaken)

#7

yes… but the challenge is, you are required to re-authorize the accounts every time you change.

Not a great user experience.

Oh well… nothings perfect :slight_smile: