Help with user role/access to a Table

I need help with a formula or code that grants specific useremail() access to edit a table.

The table is currently READ_ONLY to all USEREMAIL() but need a code that will allow USER1 only to edit Table whiles it still remains READ_ONLY to USER2, USER3 & so onโ€ฆ

Any help will be appreciated very much

Solved Solved
0 2 531
1 ACCEPTED SOLUTION

Hi @Robert_Addo_Darko,

Welcome to AppSheet community.

Please go to Data --> Table option --> Are Updates Allowedoption and please write an expression something like below

SWITCH(USEREMAIL(),
โ€œuser1@mydomain.comโ€, โ€œUPDATES_ONLYโ€,
โ€œREAD_ONLYโ€)

If you wish USER 1 to only edit the records and not add to it. Here โ€œuser1@mydomain.comโ€ is the email of the USER1. Other users will have READ_ONLY access.

OR

SWITCH(USEREMAIL(),
โ€œuser1@mydomain.comโ€, โ€œALL_CHANGESโ€,
โ€œREAD_ONLYโ€)
If you wish USER 1 to add, edit and delete the records. Here โ€œuser1@mydomain.comโ€ is teh email of the USER1. Other users will have READ_ONLY access.

Please take a look at following articles too.

View solution in original post

2 REPLIES 2

Hi @Robert_Addo_Darko,

Welcome to AppSheet community.

Please go to Data --> Table option --> Are Updates Allowedoption and please write an expression something like below

SWITCH(USEREMAIL(),
โ€œuser1@mydomain.comโ€, โ€œUPDATES_ONLYโ€,
โ€œREAD_ONLYโ€)

If you wish USER 1 to only edit the records and not add to it. Here โ€œuser1@mydomain.comโ€ is the email of the USER1. Other users will have READ_ONLY access.

OR

SWITCH(USEREMAIL(),
โ€œuser1@mydomain.comโ€, โ€œALL_CHANGESโ€,
โ€œREAD_ONLYโ€)
If you wish USER 1 to add, edit and delete the records. Here โ€œuser1@mydomain.comโ€ is teh email of the USER1. Other users will have READ_ONLY access.

Please take a look at following articles too.

This means a lot. Thanks for the help. Tried to use this expression earlier but didnโ€™t understand it. Thanks for the explanation.

Much much appreciated

Top Labels in this Space