<?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: Using 'LEFT' function (or similar) to lookup corresponding choice list in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875101#M29045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael! It works! Cheers SW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Nov 2017 05:50:33 GMT</pubDate>
    <dc:creator>Siew_WeiGoh2</dc:creator>
    <dc:date>2017-11-07T05:50:33Z</dc:date>
    <item>
      <title>Using 'LEFT' function (or similar) to lookup corresponding choice list</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875097#M29041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to use something similar to Excel expression, "LEFT" function, to refer to part of the Asset ID which will then automatically populate subsequent fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, as shown in the diagram below for Asset ID&amp;nbsp;&lt;STRONG&gt;OBN51581A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/382508_pastedImage_2.png" style="width: 496px; height: 193px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I structure the XLS form to get it to calculate or lookup the specific string from an Asset ID so that I can&lt;/P&gt;&lt;P&gt;and bring up the corresponding 'name' field listed in the choices tab?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/382510_pastedImage_4.png" style="width: 501px; height: 187px;" /&gt;&lt;/P&gt;&lt;P&gt;So, my questions are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How do I write the query to look up parts of a string - the command line to extract/look up part of Asset ID&lt;/LI&gt;&lt;LI&gt;And then get it to work with choice list and/or using choice_filter given it will be a one-to-one relationship?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of my choices sheet will be something like:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/382511_pastedImage_5.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I can use pulldata to grab the same information, however, using the external CSV dataset is somewhat rigid and required the every asset information to be correctly entered in the CSV file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;SW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 07:13:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875097#M29041</guid>
      <dc:creator>Siew_WeiGoh2</dc:creator>
      <dc:date>2017-11-03T07:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using 'LEFT' function (or similar) to lookup corresponding choice list</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875098#M29042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siew, I think what you need&amp;nbsp;is the &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#GUID-1AAC07D9-74D7-48AE-B67E-57FF578FF873"&gt;substr()&amp;nbsp;function&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The substr operator will return only part of a string, defined by the numbers after it. The first character determines the starting point of the selection, while the second value determines the length (if no second value is present, it will continue until the end of the string).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, you can use something like this in the calculation column:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;substr(${AssetId}, 0, 2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;&lt;SPAN&gt;substr(${&lt;/SPAN&gt;&lt;SPAN&gt;A&lt;/SPAN&gt;&lt;SPAN&gt;ssetId&lt;/SPAN&gt;&lt;SPAN&gt;}, 2, 5)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;&lt;SPAN&gt;substr(${&lt;SPAN&gt;A&lt;/SPAN&gt;&lt;SPAN&gt;ssetId&lt;/SPAN&gt;&lt;SPAN&gt;}, 5, &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Bear in mind that the format must be consistent xxyyyzzz. I don't think&amp;nbsp;passing this into a&amp;nbsp;cascading select&amp;nbsp;as a default answer is supported.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 09:47:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875098#M29042</guid>
      <dc:creator>MichaelKelly</dc:creator>
      <dc:date>2017-11-03T09:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using 'LEFT' function (or similar) to lookup corresponding choice list</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875099#M29043</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;The substr() function works perfectly!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have managed a work-around by combining the calculate on the substr() function followed by pulldata:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even though the calculate rows do not return physical results on the form (ie row 8 &amp;amp; 9), field attributes are still created in the feature dataset layer. Which means, I would essentially have three attribute fields returning same/similar results and are therefore redundant. Is there a way to prevent field attributes to be created for row 8 and 9 above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;SW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 12:29:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875099#M29043</guid>
      <dc:creator>Siew_WeiGoh2</dc:creator>
      <dc:date>2017-11-03T12:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using 'LEFT' function (or similar) to lookup corresponding choice list</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875100#M29044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's great to hear. There is indeed a way to prevent field attributes being created - see &lt;A href="https://community.esri.com/groups/survey123/blog/2017/10/26/the-power-of-nothing?sr=search&amp;amp;searchId=4156b067-ee4f-49f6-8618-f01e110f2bd5&amp;amp;searchIndex=0"&gt;https://community.esri.com/groups/survey123/blog/2017/10/26/the-power-of-nothing?sr=search&amp;amp;searchId=4156b067-ee4f-49f6-8618-f01e110f2bd5&amp;amp;searchIndex=0&lt;/A&gt;‌ blog post for further details. All you have to do is specify the value of the bind::esri:fieldType column&amp;nbsp;as null for the fields in question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 10:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875100#M29044</guid>
      <dc:creator>MichaelKelly</dc:creator>
      <dc:date>2017-11-06T10:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using 'LEFT' function (or similar) to lookup corresponding choice list</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875101#M29045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael! It works! Cheers SW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2017 05:50:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/using-left-function-or-similar-to-lookup/m-p/875101#M29045</guid>
      <dc:creator>Siew_WeiGoh2</dc:creator>
      <dc:date>2017-11-07T05:50:33Z</dc:date>
    </item>
  </channel>
</rss>

