<?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 Arcade Find Function not working like I wish it would in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-find-function-not-working-like-i-wish-it/m-p/1334357#M54856</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Situation:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have an AGO point layer of assets.&lt;/LI&gt;&lt;LI&gt;User adds new assets and edits existing assets&lt;/LI&gt;&lt;LI&gt;User only edits the asset category field (DTP_Cat2)&lt;/LI&gt;&lt;LI&gt;Arcade script auto-calcs a Counter field (DTP_Counter) to uniquely number each asset by category&lt;/LI&gt;&lt;LI&gt;Arcade script auto-calcs DTP_Asset_ID = DTP_Cat2 + "-" + DTP_Counter&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Objective:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SCENARIO #1: If user adds a new feature and selects a category, DTP_Counter gets the next sequential number and calcs in DTP_Asset_ID. &lt;STRONG&gt;This is done and works fine.&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;SCENARIO #2: If user edits an existing feature but doesn't change the category, the script doesn't modify the Asset ID.&lt;/LI&gt;&lt;LI&gt;SCENARIO #3: If user edits an existing feature but does change the category, the script gets the next sequential number for that category and calcs in DTP_Asset_ID.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Scenarios 2 and 3 are not working for me. The script just doesn't want to fire off. I seem to have pinpointed the issue to the Find function. I'm trying to use the Find function to say: if "STP-CO" is in "STP-CO-14" (it is), then don't change the ID; however, if "STP-AR" is not in "STP-CO-14" (it's not), then change the ID. I don't know what I'm doing wrong but the Find function is not working for me.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Data structure:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;DTP_Counter&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;DTP_Cat2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;DTP_Asset_ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;14&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-CO&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-CO-14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;14&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-AR&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-AR-14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;15&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-CO&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-CO-15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2023 22:29:41 GMT</pubDate>
    <dc:creator>GISUser74305830</dc:creator>
    <dc:date>2023-10-02T22:29:41Z</dc:date>
    <item>
      <title>Arcade Find Function not working like I wish it would</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-find-function-not-working-like-i-wish-it/m-p/1334357#M54856</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Situation:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have an AGO point layer of assets.&lt;/LI&gt;&lt;LI&gt;User adds new assets and edits existing assets&lt;/LI&gt;&lt;LI&gt;User only edits the asset category field (DTP_Cat2)&lt;/LI&gt;&lt;LI&gt;Arcade script auto-calcs a Counter field (DTP_Counter) to uniquely number each asset by category&lt;/LI&gt;&lt;LI&gt;Arcade script auto-calcs DTP_Asset_ID = DTP_Cat2 + "-" + DTP_Counter&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Objective:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SCENARIO #1: If user adds a new feature and selects a category, DTP_Counter gets the next sequential number and calcs in DTP_Asset_ID. &lt;STRONG&gt;This is done and works fine.&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;SCENARIO #2: If user edits an existing feature but doesn't change the category, the script doesn't modify the Asset ID.&lt;/LI&gt;&lt;LI&gt;SCENARIO #3: If user edits an existing feature but does change the category, the script gets the next sequential number for that category and calcs in DTP_Asset_ID.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Scenarios 2 and 3 are not working for me. The script just doesn't want to fire off. I seem to have pinpointed the issue to the Find function. I'm trying to use the Find function to say: if "STP-CO" is in "STP-CO-14" (it is), then don't change the ID; however, if "STP-AR" is not in "STP-CO-14" (it's not), then change the ID. I don't know what I'm doing wrong but the Find function is not working for me.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Data structure:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;DTP_Counter&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;DTP_Cat2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;DTP_Asset_ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;14&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-CO&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-CO-14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;14&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-AR&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-AR-14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;15&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-CO&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;STP-CO-15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 22:29:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-find-function-not-working-like-i-wish-it/m-p/1334357#M54856</guid>
      <dc:creator>GISUser74305830</dc:creator>
      <dc:date>2023-10-02T22:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Find Function not working like I wish it would</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-find-function-not-working-like-i-wish-it/m-p/1336559#M54985</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp; or&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp; - any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 14:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-find-function-not-working-like-i-wish-it/m-p/1336559#M54985</guid>
      <dc:creator>GISUser74305830</dc:creator>
      <dc:date>2023-10-10T14:14:49Z</dc:date>
    </item>
  </channel>
</rss>

