<?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 scripting in Attribute Rules in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043106#M39211</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;else if billclass = 'R' &amp;amp;&amp;amp; pimparea = 0  /* Could this be a problem */
eru = Round(parea*(2000/7760)/2000,2)
else if billclass = 'R' &amp;amp;&amp;amp; pimarea &amp;gt; 0   /* as well as this */
eru = (Round(pimparea/2000,2)

return eru;

/*
else if billclass == ('R' &amp;amp;&amp;amp; pimparea = 0)
...
else if billclass == ('R' &amp;amp;&amp;amp; pimarea &amp;gt; 0)
*/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Apr 2021 19:31:32 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2021-04-01T19:31:32Z</dc:date>
    <item>
      <title>Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043038#M39203</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I've gotten over my hurtle with creating attribute rules now, but I'm a newbie with Arcade - either in the WAB or in Pro.&lt;/P&gt;&lt;P&gt;I'm attempting to create a Calculation rule that is based on If Then Else statements.&amp;nbsp; I am getting a message about Invalid expression.&amp;nbsp; Error on line 8.&amp;nbsp; Open parenthesis expected.&lt;/P&gt;&lt;P&gt;Here's the beginning of my expression; at the end I do have return eru;&amp;nbsp; As this is the field that I am attempting to calculate.&amp;nbsp; There will be three of these set up so as to do the required pre-calcs before getting the last two calculations that are the real ones to be returned and saved.&lt;/P&gt;&lt;P&gt;It is highly likely that I'm missing just something simple, I thought that I was following the examples that I found for doing calcs and using if statements.&amp;nbsp; But ....&lt;/P&gt;&lt;P&gt;var fs = FeatureSetByName($datastore,"IDF_Stormwater");&lt;BR /&gt;var billclass = fs["MultiUserType"];&lt;BR /&gt;var eru = fs["ERUArea"];&lt;BR /&gt;var parea = fs["IDFArea"];&lt;BR /&gt;var pimparea = fs["ImperviousArea"];&lt;BR /&gt;var dwell = fs["Dwellings"];&lt;/P&gt;&lt;P&gt;if billclass == 'D'&lt;BR /&gt;eru = 0&lt;BR /&gt;else if billclass in ('V','I','H')&lt;BR /&gt;eru = Round(parea/43560,2)&lt;BR /&gt;else if billclass == 'R'&lt;BR /&gt;eru = Round(parea*(2000/7760)/2000,2)&lt;BR /&gt;else if billclass in ('A','O')&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lorinda&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 18:15:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043038#M39203</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2021-04-01T18:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043065#M39205</link>
      <description>&lt;P&gt;You're missing a statement after the last.else if.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 18:43:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043065#M39205</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2021-04-01T18:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043101#M39208</link>
      <description>&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByName($datastore,"IDF_Stormwater");
var billclass = fs["MultiUserType"];
var eru = fs["ERUArea"];
var parea = fs["IDFArea"];
var pimparea = fs["ImperviousArea"];
var dwell = fs["Dwellings"];

if billclass == 'D'
eru = 0
else if billclass in ('V','I','H')
eru = Round(parea/43560,2)
else if billclass == 'R'
eru = Round(parea*(2000/7760)/2000,2)
else if billclass in ('A','O')
 //// Need something here as Luke points out&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I took the liberty to copy and paste your code into the code editor; makes it easier to read.&amp;nbsp; If you expand the three dots to expand the tool bar and then choose the&amp;nbsp; "Insert/Edit&amp;nbsp; Code Sample" tool that looks like this: &amp;lt;/&amp;gt; you can format your code as it is meant to be read.&amp;nbsp; I used JavaScript for this...&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 19:21:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043101#M39208</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-04-01T19:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043102#M39209</link>
      <description>&lt;P&gt;Not really, the remainder of the script is after a few more lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;else if billclass = 'R' &amp;amp;&amp;amp; pimparea = 0&lt;BR /&gt;eru = Round(parea*(2000/7760)/2000,2)&lt;BR /&gt;else if billclass = 'R' &amp;amp;&amp;amp; pimarea &amp;gt; 0&lt;BR /&gt;eru = (Round(pimparea/2000,2)&lt;/P&gt;&lt;P&gt;return eru;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 19:25:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043102#M39209</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2021-04-01T19:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043104#M39210</link>
      <description>&lt;P&gt;My full script is this:&lt;/P&gt;&lt;P&gt;var fs = FeatureSetByName($datastore,"IDF_Stormwater");&lt;BR /&gt;var billclass = fs["MultiUserType"];&lt;BR /&gt;var eru = fs["ERUArea"];&lt;BR /&gt;var parea = fs["IDFArea"];&lt;BR /&gt;var pimparea = fs["ImperviousArea"];&lt;BR /&gt;var dwell = fs["Dwellings"];&lt;/P&gt;&lt;P&gt;if billclass == 'D'&lt;BR /&gt;eru = 0&lt;BR /&gt;else if billclass in ('V','I','H')&lt;BR /&gt;eru = Round(parea/43560,2)&lt;BR /&gt;else if billclass == 'R'&lt;BR /&gt;eru = Round(parea*(2000/7760)/2000,2)&lt;BR /&gt;else if billclass in ('A','O')&lt;BR /&gt;eru = Round(pimparea/2000,2)&lt;BR /&gt;else if billclass == 'M' &amp;amp;&amp;amp; dwell in (1,2)&lt;BR /&gt;imparea = parea*0.3192&lt;BR /&gt;else if bill class == 'M' &amp;amp;&amp;amp; dwell in (3,4)&lt;BR /&gt;imparea = parea*0.5093&lt;BR /&gt;else if billclass == 'M' &amp;amp;&amp;amp; dwell &amp;gt; 4&lt;BR /&gt;imparea = parea*0.5613&lt;BR /&gt;else if billclass in ('M','A','O') &amp;amp;&amp;amp; pimparea = 0&lt;BR /&gt;eru = Round(pimpara/2000,2)&lt;BR /&gt;else if billclass = 'R' &amp;amp;&amp;amp; pimparea = 0&lt;BR /&gt;eru = Round(parea*(2000/7760)/2000,2)&lt;BR /&gt;else if billclass = 'R' &amp;amp;&amp;amp; pimarea &amp;gt; 0&lt;BR /&gt;eru = (Round(pimparea/2000,2)&lt;/P&gt;&lt;P&gt;return eru;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I see that I am missing an end if it is needed.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 19:26:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043104#M39210</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2021-04-01T19:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043106#M39211</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;else if billclass = 'R' &amp;amp;&amp;amp; pimparea = 0  /* Could this be a problem */
eru = Round(parea*(2000/7760)/2000,2)
else if billclass = 'R' &amp;amp;&amp;amp; pimarea &amp;gt; 0   /* as well as this */
eru = (Round(pimparea/2000,2)

return eru;

/*
else if billclass == ('R' &amp;amp;&amp;amp; pimparea = 0)
...
else if billclass == ('R' &amp;amp;&amp;amp; pimarea &amp;gt; 0)
*/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 19:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043106#M39211</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-04-01T19:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043237#M39223</link>
      <description>&lt;P&gt;eru = (Round(pimparea/2000,2)&lt;/P&gt;&lt;P&gt;return eru;&lt;/P&gt;&lt;P&gt;Either remove the bracket before Round or add a closing bracket.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 22:32:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043237#M39223</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2021-04-01T22:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043238#M39224</link>
      <description>&lt;P&gt;Good Catch&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10780"&gt;@Luke_Pinner&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 22:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043238#M39224</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-04-01T22:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043255#M39225</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6831"&gt;@LorindaGilbert&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Not really, the remainder of the script is after a few more lines:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Which is where the error is.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 23:12:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043255#M39225</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2021-04-01T23:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043266#M39227</link>
      <description>&lt;P&gt;Alas, that didn't solve the expected open parenthesis error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Haven't checked what Joe Borgione mentioned with the two items on one line yet and the &amp;amp;&amp;amp;.&amp;nbsp; Had to start on another project in FME right now.&amp;nbsp; Will try this again tomorrow.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 00:36:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043266#M39227</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2021-04-02T00:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043331#M39230</link>
      <description>&lt;P&gt;Not altogether familiar with arcade, but it uses &lt;A href="https://developers.arcgis.com/arcade/guide/logic/#if-statements" target="_blank" rel="noopener"&gt;Javascript like syntax&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;So your statement should look something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (condition1) {
  //  block of code to be executed if condition1 is true
} else if (condition2) {
  //  block of code to be executed if condition1 is false and condition2 is true
} else {
  //  block of code to be executed if the condition1 is false and condition2 is false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;For your code, something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (billclass == 'D') {
  eru = 0
} else if (['V','I','H'].indexOf(billclass) &amp;gt;= 0) {  
    eru = Round(parea/43560,2)
} else if (billclass == 'R') {
    eru = Round(parea*(2000/7760)/2000,2)
} etc...
return eru;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note there's no "in" operator, so even if you got the if and else if syntax correct, you'll get a&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Syntax Error: Binary Operator not recognised &lt;STRONG&gt;in&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;so I've used the &lt;A href="https://developers.arcgis.com/arcade/function-reference/" target="_self"&gt;indexOf function&lt;/A&gt;&amp;nbsp;and I've changed your python-like tuples ('V','I','H') to JavaScript-like arrays ['V','I','H']&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I recommend you look at the &lt;A href="https://developers.arcgis.com/arcade/" target="_self"&gt;arcade reference&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 11:44:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043331#M39230</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2021-04-02T11:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043345#M39231</link>
      <description>&lt;P&gt;You can leave off the brackets if there is only one line in the condition, although it's good practice to use them. This code does work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var test = "";
if ($feature.name1 == 'value1') 
  test = 1;
else if ($feature.name1 == 'value2')
  test = 2;
return test;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 02 Apr 2021 13:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1043345#M39231</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-04-02T13:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044717#M39388</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I've gotten past that first hurtle, have three attribute rules validating and saved in the project - still have to test to see if they are doing as expected though.&amp;nbsp; That's another day.&lt;/P&gt;&lt;P&gt;I've now run into a situation where I need to do another if/then/else statement, but need to have it with two parts.&amp;nbsp; If field1 == value &amp;amp;&amp;amp; field2 between "0123" and "1789" - yes, the values are stored as text.&lt;/P&gt;&lt;P&gt;Can this be done?&amp;nbsp; I've tried to find some examples, but may not be putting the proper search string in.&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Lorinda&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 16:16:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044717#M39388</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2021-04-07T16:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044728#M39390</link>
      <description>&lt;P&gt;Check out t&lt;A href="https://developers.arcgis.com/arcade/guide/logic/" target="_self"&gt;he logic page for arcade&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also, you can use the &lt;A href="https://developers.arcgis.com/arcade/playground/" target="_self"&gt;Arcade Playground&lt;/A&gt; to do just that: play with Arcade.&amp;nbsp; I played around with this statement there until I got it right...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var field1 = 12
var field2 = 250

if (field1 == 12 &amp;amp;&amp;amp; field2 &amp;lt; 300 &amp;amp;&amp;amp; field2 &amp;gt; 200){
    Console("yay")}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The playground is the only place I know where the Console() function works. It's the same as the print() function in python.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 17:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044728#M39390</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-04-07T17:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044845#M39417</link>
      <description>&lt;P&gt;Where do you find this playground for testing commands?&amp;nbsp; I've not seen it yet.&amp;nbsp; I can see where it could be really useful.&lt;/P&gt;&lt;P&gt;BTW, love your 'signature'; I can relate&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lorinda&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 20:25:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044845#M39417</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2021-04-07T20:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044848#M39418</link>
      <description>&lt;P&gt;click in &lt;A href="https://developers.arcgis.com/arcade/playground/" target="_self"&gt;the link&lt;/A&gt; in my post...&lt;/P&gt;&lt;P&gt;Also, depending on what you are using, you will be presented the same Arcade edit window, which allows you, test, access global variables and functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 20:29:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044848#M39418</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-04-07T20:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044851#M39419</link>
      <description>&lt;P&gt;Thanks, was going to edit the post to say that I saw the link afterwards, but you beat me to it.&amp;nbsp; Hazards of having an eye infection, things are a bit blurry.&lt;/P&gt;&lt;P&gt;I'll take a look at your suggestions, I've been wracking my brain trying to figure out the proper terms for looking up some of these things and having troubles with it.&amp;nbsp; But bookmarking several items for the next go around with this exercise.&amp;nbsp; Have a few legacy apps to migrate to new and hopefully improved processes.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lorinda&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 20:40:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044851#M39419</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2021-04-07T20:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044852#M39420</link>
      <description>&lt;P&gt;I've been attending the developers summit yesterday and today, and have learned a ton of Arcade tips and tricks...&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 20:41:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1044852#M39420</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-04-07T20:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1051497#M40261</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I really appreciate the help that's being offered.&amp;nbsp; I've been searching for how to do nested if then now and have gotten hung up again.&amp;nbsp; I'm sure that it is something that I'm overlooking, but I've tried many iterations and still get that I have 'Unexpected Identifier' on line 31, the last else if.&amp;nbsp; This is the testing that I'm using in the playground.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lorinda&lt;/P&gt;&lt;P&gt;var billclass = "V"&lt;BR /&gt;var dor = 6400&lt;BR /&gt;var parea = 3457&lt;BR /&gt;var newfee = 0&lt;BR /&gt;var pimparea = 1500;&lt;BR /&gt;var dwell = 2;&lt;BR /&gt;var ouswmm = "Y"&lt;/P&gt;&lt;P&gt;if (parea &amp;gt; 0 &amp;amp;&amp;amp; (billclass == "V") &amp;amp;&amp;amp; (dor &amp;lt; 6647 &amp;amp;&amp;amp; dor &amp;gt; 5399)) {&lt;BR /&gt;newfee = Round(((parea/43560)*(12*0.1*5.99))+119.88,2)&lt;BR /&gt;}&lt;BR /&gt;else if (parea &amp;gt; 43560 &amp;amp;&amp;amp; (billclass == "V") &amp;amp;&amp;amp; (dor &amp;lt; 5400 || dor &amp;gt; 6647)) {&lt;BR /&gt;newfee = Round((parea/43560)*(12*(4.0 +(0.2*5.99))),2)&lt;BR /&gt;}&lt;BR /&gt;else if (parea &amp;lt;= 43560 &amp;amp;&amp;amp; (billclass == "V")) {&lt;BR /&gt;newfee = Round((12*(4.0 +(0.2*5.99))),2)&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;if ((billclass == "M") &amp;amp;&amp;amp; ((pimparea/2000) &amp;lt; (1.15 * dwell)) &amp;amp;&amp;amp; (ouswmm == "N")) {&lt;BR /&gt;newfee = Round((pimparea/2000)*(12*(4.00 + (1.0* 5.99))),2)&lt;BR /&gt;}&lt;BR /&gt;else if ((billclass == "M") &amp;amp;&amp;amp; (pimparea/2000 &amp;lt; (1.15 * dwell)) &amp;amp;&amp;amp; (ouswmm == "Y")) {&lt;BR /&gt;newfee = Round((pimparea/2000)*(12*(4.00 + (0.3* 5.99))),2)&lt;BR /&gt;}&lt;BR /&gt;else if ((billclass == "M") &amp;amp;&amp;amp; (pimparea/2000 &amp;gt;= (1.15 * dwell)) &amp;amp;&amp;amp; (ouswmm == "N")) {&lt;BR /&gt;newfee = ((119.88*1.15)*dwell)&lt;BR /&gt;}&lt;BR /&gt;else if ((billclass == "M") &amp;amp;&amp;amp; (pimparea/2000 &amp;gt;= (1.15 * dwell)) &amp;amp;&amp;amp; (ouswmm == "Y")) {&lt;BR /&gt;newfee = ((69.56*1.15)*dwell)&lt;BR /&gt;}&lt;BR /&gt;else if billclass == "M" &amp;amp;&amp;amp; newfee &amp;lt; 5 {&lt;BR /&gt;newfee = 5&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;Console (newfee)&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 20:47:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1051497#M40261</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2021-04-26T20:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade scripting in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1051732#M40284</link>
      <description>&lt;P&gt;You're missing parenthesis around the last else if and you have an extra "}" at the end. It's easier to see this if you indent the code.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var billclass = "V"
var dor = 6400
var parea = 3457
var newfee = 0
var pimparea = 1500;
var dwell = 2;
var ouswmm = "Y"

if (parea &amp;gt; 0 &amp;amp;&amp;amp; (billclass == "V") &amp;amp;&amp;amp; (dor &amp;lt; 6647 &amp;amp;&amp;amp; dor &amp;gt; 5399)) {
  newfee = Round(((parea / 43560) * (12 * 0.1 * 5.99)) + 119.88, 2)
}
else if (parea &amp;gt; 43560 &amp;amp;&amp;amp; (billclass == "V") &amp;amp;&amp;amp; (dor &amp;lt; 5400 || dor &amp;gt; 6647)) {
  newfee = Round((parea / 43560) * (12 * (4.0 + (0.2 * 5.99))), 2)
}
else if (parea &amp;lt;= 43560 &amp;amp;&amp;amp; (billclass == "V")) {
  newfee = Round((12 * (4.0 + (0.2 * 5.99))), 2)
}
else {
  if ((billclass == "M") &amp;amp;&amp;amp; ((pimparea / 2000) &amp;lt; (1.15 * dwell)) &amp;amp;&amp;amp; (ouswmm == "N")) {
    newfee = Round((pimparea / 2000) * (12 * (4.00 + (1.0 * 5.99))), 2)
  }
  else if ((billclass == "M") &amp;amp;&amp;amp; (pimparea / 2000 &amp;lt; (1.15 * dwell)) &amp;amp;&amp;amp; (ouswmm == "Y")) {
    newfee = Round((pimparea / 2000) * (12 * (4.00 + (0.3 * 5.99))), 2)
  }
  else if ((billclass == "M") &amp;amp;&amp;amp; (pimparea / 2000 &amp;gt;= (1.15 * dwell)) &amp;amp;&amp;amp; (ouswmm == "N")) {
    newfee = ((119.88 * 1.15) * dwell)
  }
  else if ((billclass == "M") &amp;amp;&amp;amp; (pimparea / 2000 &amp;gt;= (1.15 * dwell)) &amp;amp;&amp;amp; (ouswmm == "Y")) {
    newfee = ((69.56 * 1.15) * dwell)
  }
  else if (billclass == "M" &amp;amp;&amp;amp; newfee &amp;lt; 5) {
    newfee = 5
  }
}

Console(newfee)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 14:08:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-scripting-in-attribute-rules/m-p/1051732#M40284</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-04-27T14:08:50Z</dc:date>
    </item>
  </channel>
</rss>

