Survey 123 return a label value rather than name

4406
16
01-17-2017 10:40 AM
Highlighted
Occasional Contributor III

I am trying to create a customized instance name for completed surveys and would like to show a label value rather that the name value for a select_one field. Is there a way to either return the label value directly into instance_name properties in setting or to calculate it into a text field or note?

This question was asked previously here: https://community.esri.com/thread/179622 but no solution was given.

16 Replies
Highlighted
Esri Esteemed Contributor

Hi Brent,

Currently the XLSform function that would support (choice-name) this has not been implemented in Survey123 yet- it's on our list of enhancements.

Highlighted
Occasional Contributor III

Thanks James, Any idea on the time frame in which this might be implemented?

Highlighted
Occasional Contributor

FYI: I just saw this post:https://community.esri.com/groups/survey123/blog/2018/11/01/understanding-dynamic-labels-in-survey12... , which states that "choice-name"  is implemented since version 3.1.

Can't wait to try it out!

Hélène.

 

Reply
0 Kudos
Highlighted
by
Occasional Contributor III

I found a workaround for this problem...

Create a "calculate" question with a pulldata function that read from a CSV that contain the same value of your choice list

Sheet survey

typenamecalculation
select_one NameListquestion
calculatequestion_descpulldata('CSV_FileName','Description','Code',${question})

Sheet Setting

form_titleform_idinstance_name
Survey${question_desc}

And yes...of course you have a little additional work to keep syncro between choice list and CSV....but in this way it works!!

Cheers

Stefano

Reply
0 Kudos
Highlighted
Occasional Contributor III

Hello James Tedrick

I have the exact opposite issue. For some reason my survey is returning label values and not the name values from my 'select_one' list. This is problematic as I include HTML in the label to color code them:

Form:

list_namenamelabel
yes_noYES<font color='green'><b>YES</b><font>
yes_noNO<font color='red'><b>NO</b><font>

Results are recorded as:

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Andrew,

Can you check the list definition of the feature layer in your content?  You should be able to modify that now in ArcGIS Online - see Define attribute lists and ranges—ArcGIS Online Help | ArcGIS  for more information.

Reply
0 Kudos
Highlighted
Occasional Contributor III

James Tedrick

 Here's what my Labels look like in AGO. If I remove the HTML formatting, it simply gives me plain black text.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Andrew,

Just to check, are you viewing the table in the Survey123 web page, or another application?  If the former, we need to support HTML formatting in values.

Reply
0 Kudos
Highlighted
Occasional Contributor III

James Tedrick I'm not quite sure what you mean "by viewing the table". The screenshots in the above post are from the Feature Service hosted in ArcGIS Online. The actual survey itself is accessed and completed by staff using https://survey123.arcgis.com

Hope this helps.

Reply
0 Kudos