Trying to use USERROLE() and had trouble sync...

Trying to use USERROLE() and had trouble syncโ€™g changes made on mobile app.

If I add USERROLE() (see below) to the โ€œAre updates allowed?โ€ section of the table properties, it is wonderful because non-admin users cannot edit records for specific tables, without having to specify each email address.

This is great!

BUT, if I then try to add a record using my iPhone (signed in as Admin), I can edit the record, but the sync fails with an error of "Table โ€˜xyzโ€™ does not allow this operation.

I then actually have to delete the iPhone app to kill the cache records and re-install or syncs will never work.

Everything works great if I set the โ€œAre updates allowed?โ€ using the green buttons, but not if I add the Switch statement below in the expression assistant.

Any ideas how to solve?

ps: in case it matters, the source is a google sheet in

a business environment.

SWITCH(USERROLE(),

โ€œAdminโ€, โ€œALL_CHANGESโ€,

โ€œREAD_ONLYโ€)

0 7 1,135
7 REPLIES 7

Hi @Mike_Adler, could you set this up in the app (with the failed sync) and send us the details via www.appsheet.com/support

We can replay the audit log entry and debug whatโ€™s going on.

Btw, when there is any such โ€œstuckโ€ sync queue, you do not need to reinstall the app. There is an option in the app menu to reset changes.

@praveen - Thanks very much for the response as figuring out how to use USERROLE() properly will be a big step forward in managing securities for this app.

To make sure I do this correctly, can you help me with two points: 1. how do I โ€œsend you the detailsโ€?

I assume you mean the โ€œAudit Logโ€ details for the failure.

I am not sure where to post that on www.appsheet.com/support.

Can you advise?

  1. For the โ€œstuck syncโ€,

I could not find โ€œan option in the app menu to reset changesโ€ in the iPhone app or the desktop.

Does it only show if there are sync errors? UPDATE:

I now see in iPhone app, after a sync error, you can reset changes - thanks!! Customer Support - AppSheet appsheet.com

further infoโ€ฆ sync works great if I use:

SWITCH(USEREMAIL(),

โ€œ@.comโ€, โ€œALL_CHANGESโ€,

โ€œREAD_ONLYโ€)

I get sync errors (Table โ€˜xyzโ€™ does not allow this operation) if I use:

SWITCH(USERROLE(), โ€œAdminโ€, โ€œALL_CHANGESโ€, โ€œREAD_ONLYโ€)

In your Users tab, please check the role of the particular user who is syncing the changes. Iโ€™m guessing they are in the โ€˜Userโ€™ role, not the โ€˜Adminโ€™ role

To your earlier question, the support page has the option for โ€œPremium Supportโ€ and that lets you fill out a form with app name, table/rule name, and other details

Thanks @praveen.

I am the person having the sync issue, and also the admin.

I do not see myself listed in the โ€œAPPROVED USERS WHITELISTโ€.

Do I also need to explicity add myself for the USERROLE() to work?

It looks like the app developer is not added in the user list by defaultโ€ฆ

Right, the app creator is automatically given access. I have to check to see which version the app creator gets. However, to work around this problem, explicitly add yourself to the whitelist and then that allows you to explicitly control the version

Top Labels in this Space