Survey123: Add 'choice' to pick list

3100
15
03-19-2017 07:03 PM
Highlighted
New Contributor III

Having some difficulty adding values to the "choice" list of our survey123 form. Note originally published in July 2015, and has been running fine since 🙂

After editing the XLS Form (Survey123 Connect 1.10.43) and attempting to republish returns a URL_Submission issue/error >

Wondering if this could be the cause: (Ref here > Publish your survey—Survey123 for ArcGIS | ArcGIS )

Please advise of suitable workflow that does not affect the existing feature service, ie we want the update to be seamless to users (apart from downloading new form) to their device. Note no schema changes just adding an additional choice/domain!

Cheers, Craig.

15 Replies
Highlighted
Esri Esteemed Contributor

Hi Craig,

A slight change was made in terms of how the table name is specified at 1.10.  The 'form_id' entry in the settings worksheet must match the name of the layer that the form writes to.  

Highlighted
New Contributor III

Thanks James, that has sorted it. Was able to publish some more 'domains' for the choice / list that we wanted. Updated form (re-downloaded to device), open Survey and it looks great.

When reviewing the new data submitted (in Survey123 for ArcGIS > My Survey  browser) I noticed that the attribute table isn't populated with the new choice (It's blank)??? The new value is there though when you identify the feature or present under the analyze option... 

Have you any answers on that issue! 🙂

Any help much appreciated!

Cheers, Craig.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Currently Survey123Connect doesn't update the domain listing - it becomes a bit complicated keeping track of which values are added/deleted.  It may cause some issues with editing tools that expect domains to define the all values that can exist for a field (which is what a coded-value domain is supposed to do)

Reply
0 Kudos
Highlighted
New Contributor III

Thanks James, have managed to work it out and I'm very happy with the result!!!

Editing the Layer Definition file has effectively added the values (domains) to my choice list in the feature layer, and all is well. 

For the benefit of all, summarising my approach below, noting that this thread (pdf link in it) also helped me a lot 🙂 >>> https://blogs.esri.com/esri/arcgis/2014/10/19/updating-hosted-feature-services-in-arcgis-online/ 

  1. Back up your existing data from AGOL!
  2. Edit your Survey123 form through Survey123 Connect (xls spreadsheet), and add new value to choices tab.
  3. Publish survey, noting that 'form_id' needs to match layer name, also I used 'submission_url' of my feature layer. 
  4. Survey form will work at this point (download to device) and the new choice is populated but the new value isn't shown in attribute table (See James post above). My workaround follows:
  5. Update the feature layer definition file, from My Content > view details of the Feature layer and launch the Service URL
  6. Add /admin/ to the URL then 'Update Definition' (bottom of page)
  7. Fettle code for new domain/value, to match those of your choices tab in xls form spreadsheet. Note that "name" = code and "label" = name
  8. Also you need to edit the code for "lastEditDate" to "" (remove the number and add double quotes)
  9. Sorted!

Happy field data collecting 🙂

Cheers, Craig.

Highlighted
New Contributor III

I am finding that I can't update the length property and this disables my ability to make an effective changed to the coded values and names. Have you experienced this problem Craig?

Reply
0 Kudos
Highlighted
New Contributor III

Sorry Michael, other than post above haven't had to make other changes to my survey. Good luck!

Highlighted
New Contributor III

No problem Craig thank you for the response. I figured this issue out their is a column in the survey spreadsheet where you can specify a length for any survey question. still trying to reconcile other issues though.

Reply
0 Kudos
Highlighted
Occasional Contributor

This is now supported directly through the AGOL data tab.

Highlighted
New Contributor III

I needed to add another response to a survey question (added a domain value to an existing survey form question), so used the new functionality quoted above So easy, however the result is not as expected.

When I launch the survey in the Survey123 app (or in a browser) the new value isn't there, however when I launch survey through our own native app and also in Collector which uses the same feature service layer (hosted in AGOL) it is there! 

Can you offer any advice?

I think I may have to also edit the form through Survey123 Classic???

Thanks in advance for your assistance.

Cheers, Craig.

Reply
0 Kudos