<?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 Re: Arcade expression in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272445#M67277</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp; looking for a solution in the link you provided but wasn't successful. What I am trying to do is write a simple Arcade expression to find all streets in my map with a Street type of Farm and return a value of "No" but if Street type is not = to Farm then return a value of "Yes".&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is all I can come up with but it doesn't verify&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SLouq_0-1680013103989.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66498iCC60B3DDAD8408E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SLouq_0-1680013103989.png" alt="SLouq_0-1680013103989.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with this?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2023 14:18:44 GMT</pubDate>
    <dc:creator>SLouq</dc:creator>
    <dc:date>2023-03-28T14:18:44Z</dc:date>
    <item>
      <title>Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272145#M67246</link>
      <description>&lt;P&gt;How can I write this Code Block as an Arcade expression&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SLouq_0-1679947544243.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66397i69C01D427247FAB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SLouq_0-1679947544243.png" alt="SLouq_0-1679947544243.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 20:06:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272145#M67246</guid>
      <dc:creator>SLouq</dc:creator>
      <dc:date>2023-03-27T20:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272154#M67248</link>
      <description>&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/" target="_blank"&gt;https://developers.arcgis.com/arcade/&lt;/A&gt; has all kinds of resources. Your question isn't very specific, though. Is there a particular part you're having trouble with?&lt;/P&gt;&lt;P&gt;Arcade follows many of the conventions of JavaScript, so familiarity with that will help.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// defining a function
function myExpression(some_param) {
    // do something here
    return 'some value'
}

// an if-else block
If (some_condition) {
    // do something
} else if (another condition) {
    // do something else
} else {
    // do this if nothing else worked
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Mar 2023 20:12:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272154#M67248</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-03-27T20:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272164#M67250</link>
      <description>&lt;P&gt;I know just enough coding to stumble my way through an expression in VB. I have never used Arcade. I will try your link and see if I can find something.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 20:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272164#M67250</guid>
      <dc:creator>SLouq</dc:creator>
      <dc:date>2023-03-27T20:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272445#M67277</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp; looking for a solution in the link you provided but wasn't successful. What I am trying to do is write a simple Arcade expression to find all streets in my map with a Street type of Farm and return a value of "No" but if Street type is not = to Farm then return a value of "Yes".&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is all I can come up with but it doesn't verify&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SLouq_0-1680013103989.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66498iCC60B3DDAD8408E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SLouq_0-1680013103989.png" alt="SLouq_0-1680013103989.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with this?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 14:18:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272445#M67277</guid>
      <dc:creator>SLouq</dc:creator>
      <dc:date>2023-03-28T14:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272617#M67293</link>
      <description>&lt;P&gt;You are missing a couple of curly brackets. Each return statement needs to be enclosed by curly brackets. Also, you need to use a double equals sign when checking if something is equal to a value. A single equals sign is used for assigning variables.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if($feature.MAJOR_ST == 'Farm'){
   return "No"
} else {
   return "Yes"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Refer to&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/guide/logic/" target="_blank"&gt;If - else | ArcGIS Arcade | ArcGIS Developers&lt;/A&gt;&amp;nbsp;for info on if-else syntax.&lt;/P&gt;&lt;P&gt;Refer to&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/guide/operators/" target="_blank"&gt;Operators | ArcGIS Arcade | ArcGIS Developers&lt;/A&gt;&amp;nbsp;for operators, which discusses = vs ==.&lt;/P&gt;&lt;P&gt;For straight forward if-else statements, arcade also has an IIF function, which can be a little easier to create:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;IIF($feature.MAJOR_ST == "Farm", "No", "Yes")&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/#iif" target="_blank"&gt;Logical functions | ArcGIS Arcade | ArcGIS Developers&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 17:54:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272617#M67293</guid>
      <dc:creator>DanielMiranda2</dc:creator>
      <dc:date>2023-03-28T17:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272630#M67297</link>
      <description>&lt;P&gt;That worked!&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 18:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression/m-p/1272630#M67297</guid>
      <dc:creator>SLouq</dc:creator>
      <dc:date>2023-03-28T18:02:16Z</dc:date>
    </item>
  </channel>
</rss>

