<?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: Multiplying and Dividing Variables in Arcade in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1321184#M72356</link>
    <description>&lt;P&gt;Nevermind, I had the scale for the double set to 1 without knowing it. It is working properly now. I very much appreciate your help!&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2023 15:33:01 GMT</pubDate>
    <dc:creator>Bbean</dc:creator>
    <dc:date>2023-08-22T15:33:01Z</dc:date>
    <item>
      <title>Multiplying and Dividing Variables in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1320995#M72334</link>
      <description>&lt;P&gt;I need a little help with some Arcade formatting in my attribute rules. I have a valid Arcade expression made to return a number, but I am having some issues with a variable doing a mathematical expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variable InletVolume in the following example is supposed to multiply the variable D by 216, then divide it by 1728 then divide it by 27, but all it will return is 0. I have made sure the If/Else expressions are right, and if I just put it as InletVolume = D it gives the right number, but when I ask it to do any calculation such as D * 10 it just returns a 0. I am guessing that I have the formatting wrong for it, but I have tried everything I can think of with it, adding parenthesis, brackets, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help you could provide would be great!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bbean_0-1692673623711.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78740iFE0F154CB89ED0D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bbean_0-1692673623711.png" alt="Bbean_0-1692673623711.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Var StructType = $feature.StructureType&lt;BR /&gt;var SubType = $feature.Subtype&lt;BR /&gt;var D = $feature.DebrisDepth&lt;BR /&gt;var B = $feature.BoxDiamIn&lt;BR /&gt;var InletVolume = D * 216 / 1728 / 27&lt;BR /&gt;var PrereatVol = (((D * B) / 1728) / 27)&lt;BR /&gt;var ManholeVolume = 0&lt;BR /&gt;var UntrackedVolume = 0&lt;/P&gt;&lt;P&gt;if (StructType == "SD INLET") {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;return InletVolume;&lt;BR /&gt;}&amp;nbsp; else if (StructType == "PRE-TREATMENT STRUCTURE") {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;return PretreatVol;&lt;BR /&gt;}&amp;nbsp; else if (StructType == "SD MANHOLE") {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;return ManholeVolume;&lt;BR /&gt;}&amp;nbsp; else {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;return UntrackedVolume;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 03:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1320995#M72334</guid>
      <dc:creator>Bbean</dc:creator>
      <dc:date>2023-08-22T03:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying and Dividing Variables in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1321012#M72336</link>
      <description>&lt;P&gt;Possible error sources:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;null values are treated as 0. D=null will return 0, so make sure you actually have values in DebrisDepth.&lt;/LI&gt;&lt;LI&gt;for D&amp;lt;216, your result will be smaller than 1. If your target field is an integer field, these will be rounded down to 0. Make sure that your target field is a double field.&lt;/LI&gt;&lt;LI&gt;Make sure that your StructureType is actually "SD INLET", else the rule will return UntrackedVolume&lt;/LI&gt;&lt;LI&gt;You have a typo: PrereatVol should be Pre&lt;STRONG&gt;t&lt;/STRONG&gt;reatVol&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 22 Aug 2023 06:42:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1321012#M72336</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-08-22T06:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying and Dividing Variables in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1321178#M72354</link>
      <description>&lt;P&gt;Thanks for your help! It turns out that the issue is the second point that you brought up, and I went ahead and changed it over to double with number format to allow 10 decimal places, but it seems to only allow 1 decimal place, and is now returning 0.1 when it should in reality be like .005. Is there something I need to do to allow multiple decimal places in the arcade calculations?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 15:15:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1321178#M72354</guid>
      <dc:creator>Bbean</dc:creator>
      <dc:date>2023-08-22T15:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying and Dividing Variables in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1321184#M72356</link>
      <description>&lt;P&gt;Nevermind, I had the scale for the double set to 1 without knowing it. It is working properly now. I very much appreciate your help!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 15:33:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/multiplying-and-dividing-variables-in-arcade/m-p/1321184#M72356</guid>
      <dc:creator>Bbean</dc:creator>
      <dc:date>2023-08-22T15:33:01Z</dc:date>
    </item>
  </channel>
</rss>

