<?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 IF statement to generate Unique ID'S - Arcade Calculation Rules in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/if-statement-to-generate-unique-id-s-arcade/m-p/1394594#M80222</link>
    <description>&lt;P&gt;Hey I'm trying to migrate our Attribute Assistant rules from Desktop to Pro and ran into some issues with trying to configure the calculation rules&amp;nbsp; to generate our system valve Unique ID. Within Attribute Assistant we had 2&amp;nbsp;&lt;SPAN&gt;expressions to generate our ID's&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1) Generate a unique ID on the FACILITYID field - ex 14000&lt;/P&gt;&lt;P&gt;2) Next an expression was created to select the HYDRANTFLAG = Yes then add "HV-" + FacilityID, also if the ValveType was 300 then "AV-" + FacilityID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image1.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/97694i33E46D322E14C7E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image1.PNG" alt="image1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Within Arcade I'm currently using 2 rules&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image2.PNG" style="width: 847px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/97696i7EA6E00E6CB9225E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image2.PNG" alt="image2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Rule 1 code:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;var id = NextSequenceValue("wSysV_Seq");&lt;BR /&gt;return id&lt;/P&gt;&lt;P&gt;I'm having trouble with part 2, my goal is that when:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the field ACTIVEFLAG = "Yes" then the FacilityID&amp;nbsp; = "HV-" + FacilityID&lt;/LI&gt;&lt;LI&gt;If ValveType= 300 then FacilityID = "AV-"+&amp;nbsp;FacilityID&lt;/LI&gt;&lt;LI&gt;then the rest should be "MV-" + FacilityID&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still new to Arcade so thank you for helping out in advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Mar 2024 12:26:58 GMT</pubDate>
    <dc:creator>JonahW</dc:creator>
    <dc:date>2024-03-12T12:26:58Z</dc:date>
    <item>
      <title>IF statement to generate Unique ID'S - Arcade Calculation Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-statement-to-generate-unique-id-s-arcade/m-p/1394594#M80222</link>
      <description>&lt;P&gt;Hey I'm trying to migrate our Attribute Assistant rules from Desktop to Pro and ran into some issues with trying to configure the calculation rules&amp;nbsp; to generate our system valve Unique ID. Within Attribute Assistant we had 2&amp;nbsp;&lt;SPAN&gt;expressions to generate our ID's&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1) Generate a unique ID on the FACILITYID field - ex 14000&lt;/P&gt;&lt;P&gt;2) Next an expression was created to select the HYDRANTFLAG = Yes then add "HV-" + FacilityID, also if the ValveType was 300 then "AV-" + FacilityID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image1.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/97694i33E46D322E14C7E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image1.PNG" alt="image1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Within Arcade I'm currently using 2 rules&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image2.PNG" style="width: 847px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/97696i7EA6E00E6CB9225E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image2.PNG" alt="image2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Rule 1 code:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;var id = NextSequenceValue("wSysV_Seq");&lt;BR /&gt;return id&lt;/P&gt;&lt;P&gt;I'm having trouble with part 2, my goal is that when:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the field ACTIVEFLAG = "Yes" then the FacilityID&amp;nbsp; = "HV-" + FacilityID&lt;/LI&gt;&lt;LI&gt;If ValveType= 300 then FacilityID = "AV-"+&amp;nbsp;FacilityID&lt;/LI&gt;&lt;LI&gt;then the rest should be "MV-" + FacilityID&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still new to Arcade so thank you for helping out in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 12:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-statement-to-generate-unique-id-s-arcade/m-p/1394594#M80222</guid>
      <dc:creator>JonahW</dc:creator>
      <dc:date>2024-03-12T12:26:58Z</dc:date>
    </item>
  </channel>
</rss>

