<?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 substring using specific character search in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/substring-using-specific-character-search/m-p/1345331#M52660</link>
    <description>&lt;P&gt;I am looking for a way to return a substring from a text field based on a specific value within the text string. The S123 form has a text field 'pitnumber_raw' that receives data from an RFID tag. The text string is something like&amp;nbsp;'09-05-2023 14:27:27 03 TAG 3DD.003D95537C' and the desired result is 14 characters, 3DD.003D95537C. The problem I am having with the regular substring function is that the length of the initial text string is variable, some mobile devices running the S123 form place an invisible carriage return at the end of the string, and some do not.&amp;nbsp; Is there a way to select the start of the substring statement based on values within the text string?&lt;/P&gt;&lt;P&gt;In excel the formula would look like&amp;nbsp;=TRIM(MID([pitnumber_raw], SEARCH("3DD.",[pitnumber_raw]),14))&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2023 23:04:39 GMT</pubDate>
    <dc:creator>AndreaPecharich</dc:creator>
    <dc:date>2023-11-02T23:04:39Z</dc:date>
    <item>
      <title>substring using specific character search</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/substring-using-specific-character-search/m-p/1345331#M52660</link>
      <description>&lt;P&gt;I am looking for a way to return a substring from a text field based on a specific value within the text string. The S123 form has a text field 'pitnumber_raw' that receives data from an RFID tag. The text string is something like&amp;nbsp;'09-05-2023 14:27:27 03 TAG 3DD.003D95537C' and the desired result is 14 characters, 3DD.003D95537C. The problem I am having with the regular substring function is that the length of the initial text string is variable, some mobile devices running the S123 form place an invisible carriage return at the end of the string, and some do not.&amp;nbsp; Is there a way to select the start of the substring statement based on values within the text string?&lt;/P&gt;&lt;P&gt;In excel the formula would look like&amp;nbsp;=TRIM(MID([pitnumber_raw], SEARCH("3DD.",[pitnumber_raw]),14))&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 23:04:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/substring-using-specific-character-search/m-p/1345331#M52660</guid>
      <dc:creator>AndreaPecharich</dc:creator>
      <dc:date>2023-11-02T23:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: substring using specific character search</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/substring-using-specific-character-search/m-p/1345423#M52666</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/582683"&gt;@AndreaPecharich&lt;/a&gt;&amp;nbsp;Here is a JS function equivalent to your excel formula above.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function parse3DD(arg1) {
    var trimmed = arg1.trim();
    var idx = trimmed.indexOf('3DD');
    return trimmed.substring(idx,idx + 14);
}&lt;/LI-CODE&gt;&lt;P&gt;Check this for details on how to use JS functions in XLSForms:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/ba-p/898782" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/ba-p/898782&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 05:19:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/substring-using-specific-character-search/m-p/1345423#M52666</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2023-11-03T05:19:41Z</dc:date>
    </item>
  </channel>
</rss>

