numbers not working on select one questions

334
3
Jump to solution
02-14-2019 12:54 PM
Highlighted
New Contributor II

I am having issues getting a survey to work.  I get an "Error converting XLSForm" message with no detail.  I am trying to get the values 1-5 in a select one question displayed as a likert.  I have the bind::type set to "int" and the bind::esri:fieldType set to esriFieldTypeInteger.  The survey looks fine when published but all the select one and grouped select one questions I am using are not logging any values at all in the table.  any ideas what I might be doing wrong? I really need these to show up as numbers so that I can uses then as such in a dashboard I would like to create.

thanks

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Regular Contributor

Hi Josh

Thanks for providing the XLSForm. A couple of hints below to help fix the issue you're seeing:

  1. Replace the text entries in the name column on the choices worksheet with integer values.
    • The entries in the name column are the values that will be stored in the feature service; the label column is used to specify how to display each option in the form. Your survey has text in the name column for fields that are expecting an integer.
  2. Remove the 'int' entries from the bind::type column.
    • The bind::type column works well with calculate questions (as documented here), however there is a bug when using this setting with select_one questions. We have an issue logged in our system to address this. 

 I've attached a revised XLSForm for your reference.

If you needed to use the value from a select_one elsewhere in your form (for a calculation, for example) you could use the int() function in the calculation column to treat the value as an integer, for example: int(${field_1}) + int(${field_4}). EDIT: However, to avoid issues when including other integer or decimal type questions in a calculation it is recommended to add a calculate question with bind::type set to 'int' to store the answer to the select_one and then use this value in any calculations.

More info on the choices worksheet available here:

XLSForm essentials—Survey123 for ArcGIS | ArcGIS

Survey123 for ArcGIS XLSForm Tutorial 2 of 5 Creating Selection Questions in a Survey - YouTube 

Hope this helps,

Jim

View solution in original post

3 Replies
Highlighted
Esri Regular Contributor

Hi Josh

Thanks for providing the XLSForm. A couple of hints below to help fix the issue you're seeing:

  1. Replace the text entries in the name column on the choices worksheet with integer values.
    • The entries in the name column are the values that will be stored in the feature service; the label column is used to specify how to display each option in the form. Your survey has text in the name column for fields that are expecting an integer.
  2. Remove the 'int' entries from the bind::type column.
    • The bind::type column works well with calculate questions (as documented here), however there is a bug when using this setting with select_one questions. We have an issue logged in our system to address this. 

 I've attached a revised XLSForm for your reference.

If you needed to use the value from a select_one elsewhere in your form (for a calculation, for example) you could use the int() function in the calculation column to treat the value as an integer, for example: int(${field_1}) + int(${field_4}). EDIT: However, to avoid issues when including other integer or decimal type questions in a calculation it is recommended to add a calculate question with bind::type set to 'int' to store the answer to the select_one and then use this value in any calculations.

More info on the choices worksheet available here:

XLSForm essentials—Survey123 for ArcGIS | ArcGIS

Survey123 for ArcGIS XLSForm Tutorial 2 of 5 Creating Selection Questions in a Survey - YouTube 

Hope this helps,

Jim

View solution in original post

Highlighted
Esri Regular Contributor

Hi Josh, please see minor edit to the reply above.

Jim

Highlighted
New Contributor II

Thanks so Much Jim, I am up and running.  I really appreciate your help with this.