<?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: Can you calculate a hidden field removing the underscore from a select_multiple in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855489#M24636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No the underscore will vary in location and also will reside in multiple locations. &amp;nbsp; The select multiple choices are First and Last names.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jul 2017 19:16:55 GMT</pubDate>
    <dc:creator>MichaelStranovsky</dc:creator>
    <dc:date>2017-07-21T19:16:55Z</dc:date>
    <item>
      <title>Can you calculate a hidden field removing the underscore from a select_multiple</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855487#M24634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a select_multiple which list First_Lastname as the choices. &amp;nbsp; Is there a way to calculate a hidden field with the result of the selection, but remove the underscores from the results?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2017 18:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855487#M24634</guid>
      <dc:creator>MichaelStranovsky</dc:creator>
      <dc:date>2017-06-29T18:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can you calculate a hidden field removing the underscore from a select_multiple</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855488#M24635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the underscores are always at a known position in the string (like in sixth_character the underscore is character # 6), then you could use the substr() function to extract parts of the text and reassemble them- in the case above (assuming it in a question called 'q'):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;substr(${q},0,5) + substr(${q},6,string-length(${q}))&lt;/P&gt;&lt;P&gt;would give us "sixthcharacter"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That being said, is it possible to change the values of the select so they don't have underscores?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2017 18:05:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855488#M24635</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-06-30T18:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can you calculate a hidden field removing the underscore from a select_multiple</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855489#M24636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No the underscore will vary in location and also will reside in multiple locations. &amp;nbsp; The select multiple choices are First and Last names.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 19:16:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855489#M24636</guid>
      <dc:creator>MichaelStranovsky</dc:creator>
      <dc:date>2017-07-21T19:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can you calculate a hidden field removing the underscore from a select_multiple</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855490#M24637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found a very roundabout way to remove the underscores from a select_multiple response. I would love to hear if there is a different way to accomplish this, but here is how I did it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) For each option in the 'select_multiple' question, add a hidden question below. Use the calculate column to test whether an option was selected, then to populate that hidden question with either the corrected text (with spaces) or null if that option was not selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/401628_pastedImage_2.png" style="width: 767px; height: 95px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1.5) If you don't mind some extra commas in your list, you can simply add another text question and use the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;calculate column to "join" all of the hidden questions. Your result is a list of corrected text, but with some extra &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;commas in the list if you didn't choose a name in the middle of the list.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/401627_pastedImage_1.png" style="width: 775px; height: 111px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-4" src="https://community.esri.com/legacyfs/online/401634_pastedImage_1.png" style="width: 316px; height: 169px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Let's assume that you want no extra commas in the list. Then we need a few more steps. First, go back and add the separator characters (comma-space) to each of the corrected text strings.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/401629_pastedImage_3.png" style="width: 775px; height: 93px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Then join those using an empty string as the separator:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/401635_pastedImage_2.png" style="width: 744px; height: 135px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-6 jive-image" src="https://community.esri.com/legacyfs/online/401636_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-7 jive-image" src="https://community.esri.com/legacyfs/online/401637_pastedImage_4.png" style="width: 207px; height: 205px;" /&gt;&lt;/P&gt;&lt;P&gt;4) Because you don't know which option will be the last selected, your list will now include a trailing comma-space. We can use substring to remove the trailing comma-space if you want.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-8" src="https://community.esri.com/legacyfs/online/401638_pastedImage_5.png" style="width: 731px; height: 98px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-9 jive-image" src="https://community.esri.com/legacyfs/online/401639_pastedImage_6.png" style="width: 315px; height: 267px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(BONUS) 5) But what if we want to include an option to add other names, not in the pre-defined list? First, add 'other' as an option in your select_multiple list on the choices tab.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-10" src="https://community.esri.com/legacyfs/online/401640_pastedImage_7.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;6) Then add a text question for the user to fill in other names. Use the 'relevant' column to make it visible only when 'Other' has been selected. Add it to the list of questions in the join.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-11 jive-image" src="https://community.esri.com/legacyfs/online/401641_pastedImage_8.png" style="width: 712px; height: 93px;" /&gt;&lt;/P&gt;&lt;P&gt;Now we have another problem: the 'other' entry might not include a trailing separator, and therefore might delete the last two characters that we typed:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-12 jive-image" src="https://community.esri.com/legacyfs/online/401643_pastedImage_10.png" style="width: 269px; height: 247px;" /&gt;&lt;/P&gt;&lt;P&gt;7) To get around this problem, we could test whether the final two characters are 'comma-space' and only remove them if they are 'comma-space':&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-14" src="https://community.esri.com/legacyfs/online/401648_pastedImage_12.png" style="width: 734px; height: 185px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-13 jive-image" src="https://community.esri.com/legacyfs/online/401644_pastedImage_11.png" style="width: 422px; height: 351px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-15 jive-image" src="https://community.esri.com/legacyfs/online/401649_pastedImage_13.png" style="width: 417px; height: 241px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, people can enter anything they want into the 'other' text box, and it will delete a trailing comma-space even if they intended for it to stay...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Now you can use 'bind Esri field type' set to null to prevent the layer from saving all of your hidden questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Conclusion: it's possible to hack your way to a list of values with spaces, but it takes a lot of setup! &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 15:59:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855490#M24637</guid>
      <dc:creator>CarolineRose</dc:creator>
      <dc:date>2018-04-17T15:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can you calculate a hidden field removing the underscore from a select_multiple</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855491#M24638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Caroline,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great work...this was a big help.&amp;nbsp;&amp;nbsp; Thank you again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 19:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855491#M24638</guid>
      <dc:creator>MichaelStranovsky</dc:creator>
      <dc:date>2018-04-17T19:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can you calculate a hidden field removing the underscore from a select_multiple</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855492#M24639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/180433"&gt;Caroline Rose&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great post!&amp;nbsp; Thanks so much for sharing.&amp;nbsp; Have you seen or used the&amp;nbsp;&lt;EM style="background-color: #ffffff; border: 0px;"&gt;jr:choice-name()&lt;/EM&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;calculation?&amp;nbsp; It&amp;nbsp;&lt;/SPAN&gt;is great when you need to retrieve the label of a list choice, similar to what you are doing in the first step.&amp;nbsp; More on that here:&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://esri.jiveon.com/groups/survey123/blog/2018/12/02/survey123-tricks-of-the-trade-xlsform-functions-for-lists" title="https://esri.jiveon.com/groups/survey123/blog/2018/12/02/survey123-tricks-of-the-trade-xlsform-functions-for-lists"&gt;Survey123 Tricks of the Trade: XLSForm function... | GeoNet&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Since you've looked pretty far into this select_multiple question, I was wondering if you've had issues with using and displaying the results of this question type specifically in Operation Dashboard.&amp;nbsp;&amp;nbsp;Since the result of this question gives a comma delimited list, it's pretty much not usable in that app.&amp;nbsp; There have been several other posts about it, but I haven't seen an solutions or even any suggestions.&amp;nbsp; Was curious to know if you use Ops Dashboard and maybe found a workaround for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 13:10:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-you-calculate-a-hidden-field-removing-the/m-p/855492#M24639</guid>
      <dc:creator>Danielle_Papineau</dc:creator>
      <dc:date>2019-05-22T13:10:37Z</dc:date>
    </item>
  </channel>
</rss>

