<?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>idea Add functions like REGEXEXTRACT or even basic substring matching extraction in ArcGIS Survey123 Ideas</title>
    <link>https://community.esri.com/t5/arcgis-survey123-ideas/add-functions-like-regexextract-or-even-basic/idi-p/1573932</link>
    <description>&lt;P&gt;In some scenarios, such as in public surveys where JavaScript cannot be used, a simple string search can become a rather cumbersome task.&lt;/P&gt;&lt;P&gt;Imagine the following situation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;An offline survey.&lt;/LI&gt;&lt;LI&gt;An open survey to anyone.&lt;/LI&gt;&lt;LI&gt;Participants will scan a QR code.&lt;/LI&gt;&lt;LI&gt;We need to extract a specific number from this QR code. A string search or regex extraction would suffice, but neither is available.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My solution to this was a quite cumbersome....idea..&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HildermesJosMedeirosFilho_0-1736434719228.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123023iB8277C3A34A4390E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HildermesJosMedeirosFilho_0-1736434719228.png" alt="HildermesJosMedeirosFilho_0-1736434719228.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(
  regex(substr(${codigo}, 0, 5), '^#EXT#$'),
  0,
  if(
    regex(substr(${codigo}, 1, 6), '^#EXT#$'),
    1,
    if(
      regex(substr(${codigo}, 2, 7), '^#EXT#$'),
      2,
      if(
        regex(substr(${codigo}, 3, 8), '^#EXT#$'),
        3,
        if(
          regex(substr(${codigo}, 4, 9), '^#EXT#$'),
          4,
          if(
            regex(substr(${codigo}, 5, 10), '^#EXT#$'),
            5,
            if(
              regex(substr(${codigo}, 6, 11), '^#EXT#$'),
              6,
              if(
                 regex(substr(${codigo}, 7, 12), '^#EXT#$'),
                7,
                if(
                   regex(substr(${codigo}, 8, 13), '^#EXT#$'),
                  8,
                  if(
                     regex(substr(${codigo}, 9, 14), '^#EXT#$'),
                    9,
                    if(
                       regex(substr(${codigo}, 10, 15), '^#EXT#$'),
                      10,
                      if(
                         regex(substr(${codigo}, 11, 16), '^#EXT#$'),
                        11,
                        if(
                           regex(substr(${codigo}, 12, 17), '^#EXT#$'),
                          12,
                          if(
                             regex(substr(${codigo}, 13, 18), '^#EXT#$'),
                            13,
                            if(
                               regex(substr(${codigo}, 14, 19), '^#EXT#$'),
                               14,
                               if(
                                 regex(substr(${codigo}, 15, 20), '^#EXT#$'),
                                 15,
                                 if(
                                   regex(substr(${codigo}, 16, 21), '^#EXT#$'),
                                   16,
                                   if(
                                     regex(substr(${codigo}, 17, 22), '^#EXT#$'),
                                     17,
                                     if(
                                       regex(substr(${codigo}, 18, 23), '^#EXT#$'),
                                       18,
                                       if(
                                         regex(substr(${codigo}, 19, 24), '^#EXT#$'),
                                         19,
                                         "Error #EXT# not found 20 Trys"
                                       )
                                     )
                                   )
                                 )
                              )
                            )
                          )
                        )
                      )
                    )
                  )
                )
              )
            )
          )
        )
      )
    )
  )
)​&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;And&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(
  regex(substr(${codigo}, int(${extposition}) + 5, int(${extposition})+12), '^\d{3,5}#$'),
  substr(${codigo}, int(${extposition}) + 5, int(${extposition})+11),
  if(
    regex(substr(${codigo}, int(${extposition}) + 5, int(${extposition})+11), '^\d{3,5}#$'),
    substr(${codigo}, int(${extposition}) + 5, int(${extposition})+10),
    if(
      regex(substr(${codigo}, int(${extposition}) + 5, int(${extposition})+10), '^\d{3,5}#$'),
      substr(${codigo}, int(${extposition}) + 5, int(${extposition})+9),
      substr(${codigo}, int(${extposition}) + 5, int(${extposition})+8)
    )
  )
)​&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;To address this, introducing a string search function that can find specific patterns or text within a larger string would be ideal.&lt;BR /&gt;&lt;BR /&gt;This function could take a target pattern (like a keyword, number, or regex) as input and efficiently locate or extract matching parts of the string.&lt;BR /&gt;&lt;BR /&gt;Functions like REGEXEXTRACT or even basic substring matching would simplify the logic and make it easier to handle such scenarios without relying on additional libraries or advanced tools.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2025 15:08:23 GMT</pubDate>
    <dc:creator>HildermesJoséMedeirosFilho</dc:creator>
    <dc:date>2025-01-09T15:08:23Z</dc:date>
    <item>
      <title>Add functions like REGEXEXTRACT or even basic substring matching extraction</title>
      <link>https://community.esri.com/t5/arcgis-survey123-ideas/add-functions-like-regexextract-or-even-basic/idi-p/1573932</link>
      <description>&lt;P&gt;In some scenarios, such as in public surveys where JavaScript cannot be used, a simple string search can become a rather cumbersome task.&lt;/P&gt;&lt;P&gt;Imagine the following situation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;An offline survey.&lt;/LI&gt;&lt;LI&gt;An open survey to anyone.&lt;/LI&gt;&lt;LI&gt;Participants will scan a QR code.&lt;/LI&gt;&lt;LI&gt;We need to extract a specific number from this QR code. A string search or regex extraction would suffice, but neither is available.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My solution to this was a quite cumbersome....idea..&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HildermesJosMedeirosFilho_0-1736434719228.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123023iB8277C3A34A4390E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HildermesJosMedeirosFilho_0-1736434719228.png" alt="HildermesJosMedeirosFilho_0-1736434719228.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(
  regex(substr(${codigo}, 0, 5), '^#EXT#$'),
  0,
  if(
    regex(substr(${codigo}, 1, 6), '^#EXT#$'),
    1,
    if(
      regex(substr(${codigo}, 2, 7), '^#EXT#$'),
      2,
      if(
        regex(substr(${codigo}, 3, 8), '^#EXT#$'),
        3,
        if(
          regex(substr(${codigo}, 4, 9), '^#EXT#$'),
          4,
          if(
            regex(substr(${codigo}, 5, 10), '^#EXT#$'),
            5,
            if(
              regex(substr(${codigo}, 6, 11), '^#EXT#$'),
              6,
              if(
                 regex(substr(${codigo}, 7, 12), '^#EXT#$'),
                7,
                if(
                   regex(substr(${codigo}, 8, 13), '^#EXT#$'),
                  8,
                  if(
                     regex(substr(${codigo}, 9, 14), '^#EXT#$'),
                    9,
                    if(
                       regex(substr(${codigo}, 10, 15), '^#EXT#$'),
                      10,
                      if(
                         regex(substr(${codigo}, 11, 16), '^#EXT#$'),
                        11,
                        if(
                           regex(substr(${codigo}, 12, 17), '^#EXT#$'),
                          12,
                          if(
                             regex(substr(${codigo}, 13, 18), '^#EXT#$'),
                            13,
                            if(
                               regex(substr(${codigo}, 14, 19), '^#EXT#$'),
                               14,
                               if(
                                 regex(substr(${codigo}, 15, 20), '^#EXT#$'),
                                 15,
                                 if(
                                   regex(substr(${codigo}, 16, 21), '^#EXT#$'),
                                   16,
                                   if(
                                     regex(substr(${codigo}, 17, 22), '^#EXT#$'),
                                     17,
                                     if(
                                       regex(substr(${codigo}, 18, 23), '^#EXT#$'),
                                       18,
                                       if(
                                         regex(substr(${codigo}, 19, 24), '^#EXT#$'),
                                         19,
                                         "Error #EXT# not found 20 Trys"
                                       )
                                     )
                                   )
                                 )
                              )
                            )
                          )
                        )
                      )
                    )
                  )
                )
              )
            )
          )
        )
      )
    )
  )
)​&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;And&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(
  regex(substr(${codigo}, int(${extposition}) + 5, int(${extposition})+12), '^\d{3,5}#$'),
  substr(${codigo}, int(${extposition}) + 5, int(${extposition})+11),
  if(
    regex(substr(${codigo}, int(${extposition}) + 5, int(${extposition})+11), '^\d{3,5}#$'),
    substr(${codigo}, int(${extposition}) + 5, int(${extposition})+10),
    if(
      regex(substr(${codigo}, int(${extposition}) + 5, int(${extposition})+10), '^\d{3,5}#$'),
      substr(${codigo}, int(${extposition}) + 5, int(${extposition})+9),
      substr(${codigo}, int(${extposition}) + 5, int(${extposition})+8)
    )
  )
)​&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;To address this, introducing a string search function that can find specific patterns or text within a larger string would be ideal.&lt;BR /&gt;&lt;BR /&gt;This function could take a target pattern (like a keyword, number, or regex) as input and efficiently locate or extract matching parts of the string.&lt;BR /&gt;&lt;BR /&gt;Functions like REGEXEXTRACT or even basic substring matching would simplify the logic and make it easier to handle such scenarios without relying on additional libraries or advanced tools.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:08:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-ideas/add-functions-like-regexextract-or-even-basic/idi-p/1573932</guid>
      <dc:creator>HildermesJoséMedeirosFilho</dc:creator>
      <dc:date>2025-01-09T15:08:23Z</dc:date>
    </item>
  </channel>
</rss>

