Create Hidden Field in Public Survey?

5025
15
06-27-2017 04:00 PM
Highlighted
New Contributor III

I am trying to figure out a way to do two things that I know are possible but seem not to be.

I work for a nonprofit, and we are using a Survey123 form for pollution reporting from the public.

However, to manage reports, we would also like to be able to have a "Status" associated with individual reports. This is a field that would be hidden and defaulted to "Unreviewed."

I know you can do hidden fields in Survey123 Connect by editing the XLS Form, but those surveys can't be opened up to the general public and used in the web browser form, right?

Long story short: how do I have a "Status" field I can manage on the back end (probably in Citizen Problem Manager) while also keeping the public/published Survey123 form (we need the web browser format)?

Reply
0 Kudos
15 Replies
Highlighted
Esri Frequent Contributor

Hi. Try the following:

  • Add a hidden question and set its default value to 'UnReviewed'. This will create a text field  in your feature service and its value will always be populated with 'UnReviewed'. End users of your form will not see the question at all.
  • Next create a Web Application using for example Web AppBuilder and use the Edit widget to change the values from UnReviewed, to Reviewed as appropriate

The above may work for you if you do not mind having a text field. If you want a geodatabase domain to more easily change from Reviewed to UnReviewed, then you can do this:

  • Add a select_one question using a list with UnReviewed and Reviewed values. Publish your survey. This will create a field in your database with a geodatabase domain.
  • Next change the type of question from select_one to hidden and set its default value to whatever the 'name' value was for UnReviewed in your choice list. Publish the survey again.
  • If you create a Web Application next, you will see your dropdown for the domain values.

Once your feature service is created, you can also use Crowdsource Manager | ArcGIS for Local Government  to manage input from the back-office.

In terms of capturing data with your survey, you can either use the Survey123 field app or a web browser. If you want to use the web browser to capture data, try the option highlighted in the screenshot below. Note that this option is only enabled once you have published the survey.  Both the native app as well as the web browser-based option will work with private and public surveys.

Highlighted
New Contributor III

I wish it could be a clean sync with the Survey123 website system (especially for the aesthetics of background color and photo upload button symbols) rather than forcing it through a web app, but this indeed does the trick from a functional standpoint! I'm sure the connectivity will be fixed soon.
Thanks!

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Agreed! We are working towards complete integration.

Reply
0 Kudos
Highlighted
New Contributor III

Ismael Chivite

Guessed on your email based on formatting. If you did not get an email from me, would you mind sending me your email to sam@catawbariverkeeper.org? Wanted to sit down for even 15 minutes if possible. Thanks!

Reply
0 Kudos
Highlighted
New Contributor III

Ismael, I'm trying to do something similar, but I'm getting caught up on the following step.

"Next change the type of question from select_one to hidden and set its default value to whatever the 'name' value was for UnReviewed in your choice list. Publish the survey again."

When I change the field to hidden and set the default value to the the 'name' value from my select_one options, and publish again, the default value does not work. It is not populating the field. It is null. (But the domain does stick, and I can change the value using the drop-down). I know this is an old thread, but could you include screenshots of your excel doc where this works?

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Alexis,

Can you share your xlsform to see if we can see what the issue is?

Reply
0 Kudos
Highlighted
Occasional Contributor II

Hi Ismael,

I am creating health and safety survey in which I need to hide some fields from the field staff and those field need to be fill in by the H&S manager in the office. Since those fields got domain so I have tried using the following workflow suggested by you.

  • Add a select_one question using a list with UnReviewed and Reviewed values. Publish your survey. This will create a field in your database with a geodatabase domain. 
  • Next change the type of question from select_one to hidden and set its default value to whatever the 'name' value was for UnReviewed in your choice list. Publish the survey again.
  • If you create a Web Application next, you will see your dropdown for the domain values.

I have manged to all the three steps but when I have created a webapp it is not showing me any domain value as drop down. I am trying to publish the survey to Portal 10.6.

Is this workflow only applicable to ArcGIS online or I can use it in portal too? If I can't use this in Portal can you please suggest me any other way to hide the domain fields in Survey123?

Thanks,

Anu

Reply
0 Kudos
Highlighted
Occasional Contributor

Ismael,

This was incredibly helpful on my end. I've lost a lot of time from adding fields to layers after the fact, and it caused problems with apps like Explorer (invalid JSON). It was much easier doing it through Survey123 Connect the way you mentioned above, then republish the field as hidden after the fact.

Thank you!

Marvin

Reply
0 Kudos
Highlighted
Occasional Contributor III

I've created a survey using the web version of Survey123 and have successfully passed several fields and the location from an existing feature class. I would like to hide some of the fields which I need, but the field crews do not, to streamline the survey and make it as less confusing as possible.

Can I make a field hidden in the web version of Survey123?

Thanks!

April

Reply
0 Kudos