<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to return label value for a selected item? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875373#M29105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd love to see your spreadsheet and .csv.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The javarosa term jr:choice-name is not implemented in Survey123 is one reason it doesn't work.&lt;/P&gt;&lt;P&gt;The pulldata is also possible but the pulldata only works on some elements the last time I tested (and not the ones needed/wanted), will look into it again and thanks for that clarification.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 May 2017 19:04:35 GMT</pubDate>
    <dc:creator>Joseph_Kinyon</dc:creator>
    <dc:date>2017-05-12T19:04:35Z</dc:date>
    <item>
      <title>How to return label value for a selected item?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875369#M29101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;I would like to use the xpath function jr:choice-name in a calculation to return the label of a selected answer--rather than the answer itself.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;The item selected is from a "select_one_external species" filtered using a formula for the category in the choice_filter for that item.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;I understand there is some trouble if it returns zero, so it is often nested in an if statement to check.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;Would it be possible to calculate: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;if(string-length(${species}) != 0,jr:choice-name(${species},'${species}'),'none observed')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;I have tried inserting the above into the calculation as well as using:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;calculate="if(string-length(${species}) != 0,jr:choice-name(${species},'${species}'),'none')"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;I either get a blank for the whole calculation or the term "false"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;My goal is to add the value of the label to a concatenation in the instance_name on the settings tab so that the instance includes the concatenated name of the observer, the date, and the species name (instead of the stored value of the unique species code) for quick review and sorting in the field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;My concatenation using this formula is working correctly:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;concat(${observer}, "-",${species},"-",${date},"-",${time})&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jul 2016 00:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875369#M29101</guid>
      <dc:creator>Joseph_Kinyon</dc:creator>
      <dc:date>2016-07-09T00:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to return label value for a selected item?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875370#M29102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;jr:choice-name work in Survey123?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 22:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875370#M29102</guid>
      <dc:creator>Joseph_Kinyon</dc:creator>
      <dc:date>2016-07-18T22:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to return label value for a selected item?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875371#M29103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FYI, confirming that testing the following calculation does not work to return the label for the field named choice ${choice} with the type and corresponding list name "select_one yes_no"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(string-length(${choice}) != 0,jr:choice-name(${choice},'${choice}'),'nothing chosen')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MS Excel form with this calculation in it converts properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Survey123 gives no errors when the form calculates it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, nothing is returned for &lt;SPAN style="text-decoration: underline;"&gt;either&lt;/SPAN&gt; options in the if statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This same if statement works when the "jr:choice-name" function is replaced with a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 18:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875371#M29103</guid>
      <dc:creator>Joseph_Kinyon</dc:creator>
      <dc:date>2016-07-19T18:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to return label value for a selected item?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875372#M29104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears this can be achieved by using the pulldata() function against external data stored in a .csv file as described &lt;A _jive_internal="true" href="https://community.esri.com/groups/survey123/blog/2016/10/27/the-pulldata-function-access-external-data"&gt;here&lt;/A&gt; . If you store the labels in a field in&amp;nbsp;what is referred to as the "&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;&lt;STRONG&gt;&amp;lt;returnColumn&amp;gt;&lt;SPAN style="font-weight: normal;"&gt;" on the page referenced, you can use them to populate a 'calculate' field type in your xls form (this is how I did it anyway). &amp;nbsp;You may be able to get it to work within the concat() formula itself but I haven't tested it.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: normal;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;&lt;STRONG&gt;:&lt;/STRONG&gt; &amp;nbsp;tested with Survey123 Connect version 2.0.35 and survey accessed via web app.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 17:56:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875372#M29104</guid>
      <dc:creator>AlekKreiger</dc:creator>
      <dc:date>2017-05-12T17:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to return label value for a selected item?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875373#M29105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd love to see your spreadsheet and .csv.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The javarosa term jr:choice-name is not implemented in Survey123 is one reason it doesn't work.&lt;/P&gt;&lt;P&gt;The pulldata is also possible but the pulldata only works on some elements the last time I tested (and not the ones needed/wanted), will look into it again and thanks for that clarification.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 19:04:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-return-label-value-for-a-selected-item/m-p/875373#M29105</guid>
      <dc:creator>Joseph_Kinyon</dc:creator>
      <dc:date>2017-05-12T19:04:35Z</dc:date>
    </item>
  </channel>
</rss>

