In our scenario, two individuals are working from different locations, but responsible for tracking items in the inbox, retrieving information, and updating information as needed.
Is there any way in Survey123 to avoid the same record from being retrieved and submitted by two or more individuals? Filtering by user name won't be an option, since we won't to keep the number of Surveys published to a minimum. Ideally the inbox would auto-refresh on a periodic basis (setting), but this won't work in an offline scenario, so all I can come out with is the idea of versioning, where a record could be validated before the synchronization takes place.
Workflow:
Hi Javier,
You can filter the Inbox using a where clause based on username, where the username is pulled from a field in the survey that has been assigned to them and matches their logged in username. This can be done without needing to create multiple surveys.
Regards,
Phil.
Thanks for the suggestions Phillip.
I understand how we could leverage assignments to users to resolve this. However, we'd like to avoid relying on an intermediary to do these assignments, but rather have the users handling requests on the fly.
Here is an example of what could happen:
As I mention, our workflow can't rely on an individual to assign tasks, so we can't use the username in a where query clause. Also keep in mind this is an interactive environment where users that have access to Form A come and go and work in shifts, so the same record will need to be accessed by those on duty at any given time.
I hope this helps clarify.
Thanks.
Javier
Hi Javier,
Thanks for clarifying, that all makes sense. Unfortunately there is currently no easy way around this issue, as when the Inbox is refreshed, the surveys are downloaded to the device and stored locally in the sqlite database. Therefore if the user does not refresh the Inbox again before opening a survey, they may be using an old version of it. You need to ensure your training and workflow for your users advises them to refresh the Inbox whenever they are online and before they edit a survey.
However, you could try and use a JavaScript function in your survey, and have a field with validation or constraint, that queries the feature service online, and if it has been updated since the survey was downloaded (check to see if a value is different etc) you could alert the users by a note or making a constraint fail, that means they can not submit the survey.
JavaScript functions are currently a beta feature and you can find out more on the Early Adopter Community.
Regards,
Phil.
Good afternoon Phillip.
I truly appreciate your detailed response, and agree with you 100% we'll need to handle this particular case scenario through training. Would this be something the development team would consider for future versions?
Meanwhile, we'll look into the option leverage JavaScript to validate entries.
Thanks for everything.
Javier
I ran into this same issue. Two users opened the same survey for a site on separate devices. One person submitted field data and the second submitted the photo section of the survey. The second survey submitted overwrote the first one. Two questions:
1. Is there a way to recover the data submitted from the first survey if the user has already refreshed their inbox?
2. Does anyone have a sample of the Javascript code for checking data versions and preventing the overwrite from occurring?