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โ)
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?
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
User | Count |
---|---|
19 | |
9 | |
8 | |
6 | |
5 |