Offline Use

I have an app that requires the ability for offline entries due to spotty service in the field. These entries are marked as submitted once signed, and automatically show up on the supervisors app for approval. (assuming a sync has taken place).

In the editor, row edits are set to only be allowed if the entry has not been marked "Approved".

Concern : Employee>>> row submitted - sync occurs - user continues offline

                  Boss>>> marks row "Approved"

                  Employee>>> opens app offline -makes changes to submitted record- sync occurs - update                      to row still happens even though on the server side it has been approved.

 

Can I limit the ability to make row edits to when the user is online or at least has synced within the last 10 minutes?

0 4 135
4 REPLIES 4


@PCV_Tech wrote:

Can I limit the ability to make row edits to when the user is online or at least has synced within the last 10 minutes?

 

Yes and no (the sync part leaves no data behind to be able to check whether this happens or not), but you need an extra column for that [datetime] and you will have an expensive expression to check if you can still edit the record if it was made x minutes ago (a time expression)

Steve
Platinum 4
Platinum 4

If the supervisor's approval is recorded in the same row the employee has submitted, then in the scenario you describe, the supervisor's approval will be removed when the employee's updated row is later synced.

Rows are updated as entire rows, so if any column value of a row changes, all of the column values of that row (not just the changed column values) are saved, replacing whatever column values are already saved for that row.

Thank you for the replies, perhaps I will have the "Edit" action link to a row that forces a sync at the same time, or save edits in a separate table via copy and edit action, and overwrite those rows via Appscript on next sync if those rows haven't been marked approved. The latter option sounding a bit ridiculous however. 

That being said I am currently field testing the app in poor service, if the requirement for offline use was over exaggerated  I will revert to sync on start.

A third option would be to leave one app as sync on start for the masses, and only the remote workers directed too a copy of app that allows offline submissions. Then applying a solution for edits to smaller subset of users and limit issues.

Thank You,

 

Can I just mark both replies as Solution you both helped, can't really pick just one.

Also, not sure this is related, but ever since I changed the app to offline use, this initial value formula fails in the app emulator:

Column Type: Ref w/ valid if the same formula  as below minus the index call.

index(select(Projects[Project ID], in([_thisrow].[Time Record].[Area], [Related Project Details][Area])),1)

On my phone it pulls the appropriate Project ID Key, and when I test the formula in the editor it works correctly however not in the emulator.

Just toggled allow offline settings, saving in between, and that solved it. Its happened once before to me and no idea how I fixed it, so I'm at a loss, just happy it still works in the app.

Top Labels in this Space