Survey 123 return a label value rather than name

9066
16
01-17-2017 10:40 AM
BrentKinal1
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
JamesTedrick
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.

BrentKinal1
Occasional Contributor III

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

HélèneTouyéras
Occasional Contributor II

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.

 

SMauri
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

0 Kudos
AndrewHargreaves2
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:

JamesTedrick
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.

0 Kudos
AndrewHargreaves2
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.

0 Kudos
JamesTedrick
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.

0 Kudos
AndrewHargreaves2
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.