Survey123 hidden field dropdown list

2272
6
09-21-2018 04:01 AM
EricS
by
Occasional Contributor

I want to have a dropdown pick list to appear on the web map when a question is hidden. Valid/Not Valid.(no typing)  In my research I saw that you first create the question as a select one, publish it then change it to hidden and publish it again.  I tried that and it is not working.  I do not get the dropdown pick list.  Am I not doing it correctly?  Is it a capability I have in 10.4 environment?

0 Kudos
6 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Eric,

Are you asking to show a question on a form when another question is not displayed?  This is handled through the relevant column - see Form expressions—Survey123 for ArcGIS | ArcGIS on getting started.  

0 Kudos
EricS
by
Occasional Contributor

What I want is a hidden select_one question.  Which means I have only two choices valid/not valid.  This question is hidden but when the user goes to the web map the user does not have to type the word invalid but rather just do a dropdown picklist that only shows valid and invalid as choices

0 Kudos
IsmaelChivite
Esri Frequent Contributor

Hi Eric, you initial research is correct.

  1. In a brand new survey, include a select_one question in your survey and publish it.This will create a new field of type text for your select_one question and a geodatabase domain will be assigned to it with the values in your choice list.  At this point, if you open the feature layer of your survey in a web map, you will see the dropdown.
  2. To hide the select_one question from your survey, while preserving the field with its geodatabase doman, change the type of question in your XLSForm from select_one to hidden, or simply remove the question from your XLSForm.  Then publish your survey again. It does not matter, if change the type to hidden or remove the question from the XLSForm, your form will not show the question and your field will be preserved (in both cases).
  3. If using a web browser to render your form, refresh the survey page. If using the Survey123 app, download the survey again to see the select_one question go in the survey.

The steps described above work well in ArcGIS Online and ArcGIS Enterprise 10.4 and newer.

EricS
by
Occasional Contributor

Is there upgrades in the works for this process? Our surveys are always

changing and we are sharing xls forms. That means the domain for hidden

field is not going to work unless you do the steps as the first thing. Any

recommendations on workarounds?

0 Kudos
ThomasLaue1
New Contributor II

How about setting the type as “select one” however set the relevant expression to something that will never be true? 

This way the field will always be hidden in Survey123 but accessible with the proper dropdowns in ArcGIS online.

I hid some fields in Survey123 using a relevant expression: today()>today()

EricS
by
Occasional Contributor

Great suggestion!  I tried it but the problem is I have a calculation formula on the select_one question and my answer for it changes depending on answers from previous questions. The calculation formula does not work when a relevance formula is written in. Any other thoughts??

0 Kudos