Hi everyone,
In my app, we have a feature to start an inspection. The user needs to click on a action button that takes them to a form. When the form is saved, an action is also performed to save the timestamp of the event. Once the inspection is started, the action button to start an inspections gets removed to prevent other users starting the same inspection
However, there is an edge case when both users haven't sync and both start filling up the form at the same time, this causes some unwanted issues. The way that I'm trying to solve this is doing the following:
1. Triggering a force sync when navigating to the form, as shown by @MultiTech in this video: https://www.youtube.com/watch?v=3BQ_xVnalm4 Thanks for that!
By syncing before filling the form, the user should have the latest data
2. Checking that the timestamp is null when saving the form. This will prevent that the second user (after the first one already started) saves the form because the timestamp value has already been synced (thanks to the forced sync from the step before)
The issue is that in the validation of the form (I'm using Valid If); I'm checking for an empty timestamp, but because the timestamp gets set after saving the form in the 'Form Saved' event, the saving forms and gives an error, because the timestamp is just getting updated by the same form
How can I check for the timestamp field before getting the form saved but also allowing the form to be saved and not mess up the first time that the form gets saved?
Thanks
User | Count |
---|---|
35 | |
11 | |
3 | |
3 | |
2 |