Is it possible to set the default answer to the last one selected?

1596
1
09-09-2016 02:55 PM
bobwright
Occasional Contributor

We will be having folks at 32 different check stations covering several different permit areas during our upcoming deer hunting season. So, Joe stationed at Harry's Hardware will almost always be registering deer harvested in permit area 339, while Mary stationed at Karla's Kitty Boutique will almost always be registering deer harvested in permit area 342.I know I can set the default in the form, but I would have to create and manage 32 different forms to accomplish this. I am hoping there is a way for Survey123 to "remember" the last entry. Thanks for any help.

0 Kudos
1 Reply
IsmaelChivite
Esri Notable Contributor

Hi. I am including an attachment that may be helpful for your use case. In the ZIP file you will find two files:

  • The XLSFile is for you to import in Survey123 Connect for ArcGIS (Click on New Survey, then select the File option so you can browse to it).
  • The CSV file is for you to manually copy in the media folder of the survey you created in the previous step.  You can do this, by opening the directory of your survey and then copying the file into the media folder

As you  will see, when you select a station, you will get a default permit area number in the second question. You can always overwrite the permit area.

I used  the new pulldata function for the example above. I used the CSV file as a lookup table, to associate a permit area with the selected station. The pulldata function is used in the calculation column.

What I REALLY wanted to do is to set the permit area question as a select_one, so people could change the permit area if desired, but only picking a valid permit area. Unfortunately, calculations cannot change the value of a select_one (at least in the current 1.7 release), so I had to change the question type to integer (I could have also used a text type of question).  Using a text or integer question can add room for user error, as they may overwrite your default value with an invalid permit area.

Another approach you could take is to use favorites. Using favorites would work as follows:

  1. End user opens your survey in the mobile app.
  2. First thing they populate the station and permit area pulling from the available lists of choices. There will be no smart default value here. They really need to know what station they are on...
  3. Once they have populated these questions they would select the option in the app to copy as favorite answers. It is VERY important that the user at this moment ONLY answers the questions that should be kept as favorites.  Once the questions have  been answered, the user  will save the survey as a draft.
  4. At this moment, your draft  survey has become your survey containing your favorites.   All answered questions in this survey can now be easily pasted into the next  survey.  This will include your station number. Since I assume people will probably sit in a station all day, this could also be a solution.  If they move to another station, they could repeat the process outlined above to reset the favorites.
0 Kudos