<?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, how to write if statement for two conditions? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264039#M66190</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using the Vary Symbology by Attribute and I need to write an Arcade expression that returns a value if two conditions are met.&amp;nbsp; &amp;nbsp;Below is what I have, but it has an error somewhere I can't find.&lt;/P&gt;&lt;P&gt;See screenshot attached image for error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anybody able to offer some help?&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ($feature.explosives_manufacturer == 'SMASH') &amp;amp;&amp;amp;&lt;BR /&gt;($feature.Controller_Name__Current_ == 'ALC') {return 2;}&lt;BR /&gt;else {return 1;}&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2023 17:46:31 GMT</pubDate>
    <dc:creator>JonJones1</dc:creator>
    <dc:date>2023-03-03T17:46:31Z</dc:date>
    <item>
      <title>Arcade, how to write if statement for two conditions?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264039#M66190</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using the Vary Symbology by Attribute and I need to write an Arcade expression that returns a value if two conditions are met.&amp;nbsp; &amp;nbsp;Below is what I have, but it has an error somewhere I can't find.&lt;/P&gt;&lt;P&gt;See screenshot attached image for error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anybody able to offer some help?&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ($feature.explosives_manufacturer == 'SMASH') &amp;amp;&amp;amp;&lt;BR /&gt;($feature.Controller_Name__Current_ == 'ALC') {return 2;}&lt;BR /&gt;else {return 1;}&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 17:46:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264039#M66190</guid>
      <dc:creator>JonJones1</dc:creator>
      <dc:date>2023-03-03T17:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade, how to write if statement for two conditions?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264104#M66198</link>
      <description>&lt;LI-CODE lang="javascript"&gt;if ($feature.explosives_manufacturer == 'SMASH' &amp;amp;&amp;amp;
$feature.Controller_Name__Current_ == 'ALC') {return 2}
else {return 1}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Mar 2023 18:32:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264104#M66198</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-03-03T18:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade, how to write if statement for two conditions?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264120#M66201</link>
      <description>&lt;P&gt;This is perfect!&amp;nbsp; &amp;nbsp;I do have a quick follow-up, how could I expand the code to write more statements?&amp;nbsp; Such as this, but this is wrong and doesn't work;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ($feature.explosives_manufacturer == 'SMASH' &amp;amp;&amp;amp;&lt;BR /&gt;$feature.Controller_Name__Current_ == 'ALC') {return 2}&lt;BR /&gt;else {return 1}&lt;/P&gt;&lt;P&gt;||&lt;/P&gt;&lt;P&gt;if ($feature.explosives_manufacturer == 'SMASH' &amp;amp;&amp;amp;&lt;BR /&gt;$feature.Controller_Name__Current_ == 'QVC') {return 3}&lt;BR /&gt;else {return 1}&lt;/P&gt;&lt;P&gt;Had to edit the code in the post for a clearer explanation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 19:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264120#M66201</guid>
      <dc:creator>JonJones1</dc:creator>
      <dc:date>2023-03-03T19:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade, how to write if statement for two conditions?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264137#M66204</link>
      <description>&lt;LI-CODE lang="javascript"&gt;if ($feature.explosives_manufacturer == 'SMASH' &amp;amp;&amp;amp;
$feature.Controller_Name__Current_ == 'ALC') 
{return 2}

else if ($feature.explosives_manufacturer == 'SMASH' &amp;amp;&amp;amp;
$feature.Controller_Name__Current_ == 'QVC') 
{return 3}

else {return 1}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Mar 2023 19:50:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-how-to-write-if-statement-for-two/m-p/1264137#M66204</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-03-03T19:50:11Z</dc:date>
    </item>
  </channel>
</rss>

