<?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: Field Calculator syntax vb calculating slope percentage in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3482#M226</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I will assume your Invert values are your elevations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are they also a double or integer?&amp;nbsp; As well as your length field&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you verified that all the Invert and length fields have values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;((abs([From_Invert] -[To_Invert]))/[Length])*100 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Select just one feature in your table and run it on just that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For length are you using the shape length or a calculated length.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you still get the error run it again but instead of using shapelenght put in some number like 150&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Robert,&lt;BR /&gt;Thank you for your prompt reply. All of the fields are doubles.&lt;BR /&gt;&lt;BR /&gt;I have attached a screen shot of the error I get when running the field calculator with the exact formula from my original post.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Dana&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Feb 2014 16:49:14 GMT</pubDate>
    <dc:creator>RobertBorchert</dc:creator>
    <dc:date>2014-02-18T16:49:14Z</dc:date>
    <item>
      <title>Field Calculator syntax vb calculating slope percentage</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3479#M223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attempting to calculate the slope of sewer lines. I am apparently missing some fundamentals of vb to get the syntax correct. I have fields:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;From_Invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To_Invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Length (calculated)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The mathematical equation (rise/run) should be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(([From_Invert] -[To_Invert])/[Length])*100 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't get it to fly in the field calculator. Any help would be greatly appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dana&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 15:24:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3479#M223</guid>
      <dc:creator>DanaVan_Horn</dc:creator>
      <dc:date>2014-02-18T15:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator syntax vb calculating slope percentage</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3480#M224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just use the simple&amp;nbsp;&amp;nbsp; Slope= RISE/RUN&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and multiply that times 100 to get a %&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RISE = change in elevation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RUN = Distance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what your doing looks right. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the attribute you are trying to do it in?&amp;nbsp; It should be a double precision.&amp;nbsp; If it is a long or short integer or may not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am attempting to calculate the slope of sewer lines. I am apparently missing some fundamentals of vb to get the syntax correct. I have fields:&lt;BR /&gt;From_Invert&lt;BR /&gt;To_Invert&lt;BR /&gt;Length (calculated)&lt;BR /&gt;&lt;BR /&gt;The mathematical equation (rise/run) should be something like this:&lt;BR /&gt;&lt;BR /&gt;(([From_Invert] -[To_Invert])/[Length])*100 &lt;BR /&gt;I can't get it to fly in the field calculator. Any help would be greatly appreciated. &lt;BR /&gt;Regards,&lt;BR /&gt;Dana&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 16:23:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3480#M224</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2014-02-18T16:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator syntax vb calculating slope percentage</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3481#M225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your prompt reply. All of the fields are doubles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached a screen shot of the error I get when running the field calculator with the exact formula from my original post.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dana&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 16:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3481#M225</guid>
      <dc:creator>DanaVan_Horn</dc:creator>
      <dc:date>2014-02-18T16:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator syntax vb calculating slope percentage</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3482#M226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I will assume your Invert values are your elevations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are they also a double or integer?&amp;nbsp; As well as your length field&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you verified that all the Invert and length fields have values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;((abs([From_Invert] -[To_Invert]))/[Length])*100 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Select just one feature in your table and run it on just that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For length are you using the shape length or a calculated length.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you still get the error run it again but instead of using shapelenght put in some number like 150&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Robert,&lt;BR /&gt;Thank you for your prompt reply. All of the fields are doubles.&lt;BR /&gt;&lt;BR /&gt;I have attached a screen shot of the error I get when running the field calculator with the exact formula from my original post.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Dana&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 16:49:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3482#M226</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2014-02-18T16:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator syntax vb calculating slope percentage</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3483#M227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I ran it on one and it worked. I found a sneaky null value in the elevation fields! Thank you for all of your help talking me through this.Probably the easiest problem you've helped with today &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dana&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 17:00:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3483#M227</guid>
      <dc:creator>DanaVan_Horn</dc:creator>
      <dc:date>2014-02-18T17:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator syntax vb calculating slope percentage</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3484#M228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Null value would do it.&amp;nbsp; Glad it worked out for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Robert, &lt;BR /&gt;I ran it on one and it worked. I found a sneaky null value in the elevation fields! Thank you for all of your help talking me through this.Probably the easiest problem you've helped with today &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;Thanks again!!!&lt;BR /&gt;Dana&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 17:19:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-syntax-vb-calculating-slope/m-p/3484#M228</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2014-02-18T17:19:01Z</dc:date>
    </item>
  </channel>
</rss>

