Is it possible to build a prompt into Survey123 survey that lets the user know when they are about to submit a duplicate value?

263
2
Jump to solution
07-27-2021 06:08 AM
JamesKelly4
Occasional Contributor

I administer a survey that has gone from about 2k records annually to about 20k records entered annually in the past 5 years. Data cleanup (QA/QC) has become a significant burden for our organization, and I am trying to improve my survey by reducing the amount of bad data being entered. One of the main issues we are having is erroneously duplicated confirmation numbers (conf_no) . However, there are instances where a duplicated confirmation number is legitimate so setting that field to unique in AGO isn't an ideal solution. Is there a way to configure the survey so that when a confirmation number is entered into the conf_no field a warning message would display to alert the user and ask them to double-check that they have the right confirmation number? Thanks in advance for any help! @Philip-Wilson @ZacharySutherby @JamesTedrick 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JamesKelly4
Occasional Contributor

In case it is helpful to others, I figured out a way to do this (see below). If others have more streamlined ways that doesn't involve storing and uploading files from my PC I'd love to learn from you!

So what made this problem challenging was the dynamic nature of the data. If it were static and not constantly being updated I could just place a copy of the data to the media folder and use the pull data function in a note field that would indicate to the person entering the data that the confirmation number that they are entering data for is already in the data source. However, new data is constantly being added by multiple users so the challenge was automatically putting an updated data source in the media folder. Below is how I solved that problem (at least for now).

So essentially I configured a series of 3 scripts: one to download a copy of the data from AGO to a file on my PC, one to query and reformat the data and save to another file in my media folder, and another to upload the media folder in AGO based on the file saved to the media folder on my PC. 

The first script is a python 2.7 script that ESRI folks shared a few years back called DownloadSurvey123Data.py. I can share a copy of that if anyone else wants it. 

The second script is a very simple R script that uses the tidyverse package to query and reformat the data.

The third script is one that @Philip-Wilson developed and shared back in 2017 called updateMediaFolder.py

Once I got all three scripts to successfully run, I scheduled a task on my Windows 10 PC that runs the 3 scripts in order every hour. 

 

View solution in original post

0 Kudos
2 Replies
JamesKelly4
Occasional Contributor

@MichaelKelly might you be able to help with this one? Thanks in advance for any help you can provide!

0 Kudos
JamesKelly4
Occasional Contributor

In case it is helpful to others, I figured out a way to do this (see below). If others have more streamlined ways that doesn't involve storing and uploading files from my PC I'd love to learn from you!

So what made this problem challenging was the dynamic nature of the data. If it were static and not constantly being updated I could just place a copy of the data to the media folder and use the pull data function in a note field that would indicate to the person entering the data that the confirmation number that they are entering data for is already in the data source. However, new data is constantly being added by multiple users so the challenge was automatically putting an updated data source in the media folder. Below is how I solved that problem (at least for now).

So essentially I configured a series of 3 scripts: one to download a copy of the data from AGO to a file on my PC, one to query and reformat the data and save to another file in my media folder, and another to upload the media folder in AGO based on the file saved to the media folder on my PC. 

The first script is a python 2.7 script that ESRI folks shared a few years back called DownloadSurvey123Data.py. I can share a copy of that if anyone else wants it. 

The second script is a very simple R script that uses the tidyverse package to query and reformat the data.

The third script is one that @Philip-Wilson developed and shared back in 2017 called updateMediaFolder.py

Once I got all three scripts to successfully run, I scheduled a task on my Windows 10 PC that runs the 3 scripts in order every hour. 

 

View solution in original post

0 Kudos