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.
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.
Thanks James, Any idea on the time frame in which this might be implemented?
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.
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
type | name | calculation |
---|---|---|
select_one NameList | question | |
calculate | question_desc | pulldata('CSV_FileName','Description','Code',${question}) |
Sheet Setting
form_title | form_id | instance_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
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_name | name | label |
---|---|---|
yes_no | YES | <font color='green'><b>YES</b><font> |
yes_no | NO | <font color='red'><b>NO</b><font> |
Results are recorded as:
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.
Here's what my Labels look like in AGO. If I remove the HTML formatting, it simply gives me plain black text.
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.
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.