<?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 Calculater in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95188#M3303</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The code you have written should work if you get rid of the line that says Dim Output as String.&amp;nbsp; VB Script does not use DIM anymore and it is not even necessary if you are using VBA with ArcMap 9.3 (but then the ElseIf needs to be changed to Else If for VBA).&amp;nbsp; Make sure you do the calculate to a text field with enough characters to accept the values you want it output and the make sure the field expression is the word Output.&amp;nbsp; If the Class field is numeric you can't use the field calculator to overwrite that field to a text value and would have to create a new field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If [Class] = 1&amp;nbsp; Then 
&amp;nbsp; Output = "Very Low"
Elseif [Class] = 2 Then 
&amp;nbsp; Output = "Low"
Elseif [Class] = 3 Then 
&amp;nbsp; Output = "Moderate"
Elseif [Class] = 4 Then 
&amp;nbsp; Output = "High"
Elseif [Class] = 5 Then 
&amp;nbsp; Output = "Very High"
Elseif [Class] = 6 Then 
&amp;nbsp; Output = "Extreme"
Else
&amp;nbsp; Output = "xxx"
End If&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression: Output&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:38:25 GMT</pubDate>
    <dc:creator>RichardFairhurst</dc:creator>
    <dc:date>2021-12-10T23:38:25Z</dc:date>
    <item>
      <title>Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95186#M3301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear tech Support Team,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on table i want some correction in script for calculating field &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have Data in Grid_code field in the form of 1 to 6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In grid_code field there is value 1 to 6 i want 1 is convert as Very low, 2 Is Low, 3 is Moderate, 4 is High and 5 is Very high in Class field i am using following script&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim Output as String &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If [Class] = 1&amp;nbsp; Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Output = "Very Low"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Elseif [Class] = 2 Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output = "Low"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Elseif [Class] = 3&amp;nbsp; Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Output = "Moderate"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Elseif [Class] = 4&amp;nbsp; Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output = "High"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Elseif [Class] = 5&amp;nbsp; Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output = "Very High"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Elseif [Class] = 6&amp;nbsp; Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output = "Extreme"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output = "xxx"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end if&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help me to correct this script or please tell me where i get solution &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &amp;amp; Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Abhishek Misra&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 08:03:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95186#M3301</guid>
      <dc:creator>AbhishekMisra</dc:creator>
      <dc:date>2014-01-24T08:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95187#M3302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you only need to do this once or twice your over thinking it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Simple perform a selection for all feature 1 then field calculate "Very Low"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or create a coded domain for that attribute &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1&amp;nbsp;&amp;nbsp; Very Low&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2&amp;nbsp;&amp;nbsp; Low &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That way down the road whenever someone enters the 1, 2, 3 etc... the field will populate with the desired text.&amp;nbsp; And it will appear as a drop down selection when editing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Dear tech Support Team,&lt;BR /&gt;I am working on table i want some correction in script for calculating field &lt;BR /&gt;I have Data in Grid_code field in the form of 1 to 6&lt;BR /&gt;In grid_code field there is value 1 to 6 i want 1 is convert as Very low, 2 Is Low, 3 is Moderate, 4 is High and 5 is Very high in Class field i am using following script&lt;BR /&gt;&lt;BR /&gt;Dim Output as String &lt;BR /&gt; If [Class] = 1&amp;nbsp; Then &lt;BR /&gt; Output = "Very Low"&lt;BR /&gt;Elseif [Class] = 2 Then &lt;BR /&gt;Output = "Low"&lt;BR /&gt; Elseif [Class] = 3&amp;nbsp; Then &lt;BR /&gt; Output = "Moderate"&lt;BR /&gt;Elseif [Class] = 4&amp;nbsp; Then &lt;BR /&gt;Output = "High"&lt;BR /&gt;Elseif [Class] = 5&amp;nbsp; Then &lt;BR /&gt;Output = "Very High"&lt;BR /&gt;Elseif [Class] = 6&amp;nbsp; Then &lt;BR /&gt;Output = "Extreme"&lt;BR /&gt;Else&lt;BR /&gt;Output = "xxx"&lt;BR /&gt;end if&lt;BR /&gt;Please help me to correct this script or please tell me where i get solution &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Abhishek Misra&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 13:38:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95187#M3302</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2014-01-27T13:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95188#M3303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The code you have written should work if you get rid of the line that says Dim Output as String.&amp;nbsp; VB Script does not use DIM anymore and it is not even necessary if you are using VBA with ArcMap 9.3 (but then the ElseIf needs to be changed to Else If for VBA).&amp;nbsp; Make sure you do the calculate to a text field with enough characters to accept the values you want it output and the make sure the field expression is the word Output.&amp;nbsp; If the Class field is numeric you can't use the field calculator to overwrite that field to a text value and would have to create a new field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If [Class] = 1&amp;nbsp; Then 
&amp;nbsp; Output = "Very Low"
Elseif [Class] = 2 Then 
&amp;nbsp; Output = "Low"
Elseif [Class] = 3 Then 
&amp;nbsp; Output = "Moderate"
Elseif [Class] = 4 Then 
&amp;nbsp; Output = "High"
Elseif [Class] = 5 Then 
&amp;nbsp; Output = "Very High"
Elseif [Class] = 6 Then 
&amp;nbsp; Output = "Extreme"
Else
&amp;nbsp; Output = "xxx"
End If&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression: Output&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:38:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95188#M3303</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-10T23:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95189#M3304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks now Script is working fine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Abhishek Misra&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The code you have written should work if you get rid of the line that says Dim Output as String.&amp;nbsp; VB Script does not use DIM anymore and it is not even necessary if you are using VBA with ArcMap 9.3 (but then the ElseIf needs to be changed to Else If for VBA).&amp;nbsp; Make sure you do the calculate to a text field with enough characters to accept the values you want it output and the make sure the field expression is the word Output.&amp;nbsp; If the Class field is numeric you can't use the field calculator to overwrite that field to a text value and would have to create a new field.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If [Class] = 1&amp;nbsp; Then 
&amp;nbsp; Output = "Very Low"
Elseif [Class] = 2 Then 
&amp;nbsp; Output = "Low"
Elseif [Class] = 3 Then 
&amp;nbsp; Output = "Moderate"
Elseif [Class] = 4 Then 
&amp;nbsp; Output = "High"
Elseif [Class] = 5 Then 
&amp;nbsp; Output = "Very High"
Elseif [Class] = 6 Then 
&amp;nbsp; Output = "Extreme"
Else
&amp;nbsp; Output = "xxx"
End If&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Expression: Output&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:38:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95189#M3304</guid>
      <dc:creator>AbhishekMisra</dc:creator>
      <dc:date>2021-12-10T23:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95190#M3305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Richard&lt;/P&gt;&lt;P&gt;once again i am stuck in a similar kind of script please help me my script is &lt;/P&gt;&lt;P&gt;If [Area_ha]= &amp;lt; 1000&amp;nbsp; Then &lt;/P&gt;&lt;P&gt;Output = "I"&lt;/P&gt;&lt;P&gt;Else if [Area_ha] &amp;gt; 1000 &amp;amp; [Area_ha]= &amp;lt; 3000 Then &lt;/P&gt;&lt;P&gt;Output = "II"&lt;/P&gt;&lt;P&gt;Else if [Area_ha] &amp;gt; 3000 &amp;amp; [Area_ha]= &amp;lt; 5000 Then &lt;/P&gt;&lt;P&gt;Output = "III"&lt;/P&gt;&lt;P&gt;Else if [Area_ha] &amp;gt; 5000 &amp;amp; [Area_ha]= &amp;lt; 10000 Then &lt;/P&gt;&lt;P&gt;Output = "IV"&lt;/P&gt;&lt;P&gt;Else if [Area_ha] &amp;gt; 10000 Then &lt;/P&gt;&lt;P&gt;Output = "V"&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Output = "xxx"&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 07:07:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95190#M3305</guid>
      <dc:creator>AbhishekMisra</dc:creator>
      <dc:date>2014-09-04T07:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95191#M3306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abhishek:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the revision below.  You cannot use the &amp;amp; for AND in a logical expression.  That only works for concatenating strings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 07:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95191#M3306</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-09-04T07:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95192#M3307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks For your quick reply &lt;/P&gt;&lt;P&gt;but i am unable to understand your point i want to calculate field in between 1000 to 3000 as II&lt;/P&gt;&lt;P&gt;so what kind of logical expression will be use for this&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 07:17:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95192#M3307</guid>
      <dc:creator>AbhishekMisra</dc:creator>
      <dc:date>2014-09-04T07:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95193#M3308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Abhishek,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;You have to use the word AND in your script not the ampersand '&amp;amp;' symbol:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Else if [Area_ha] &amp;gt; 1000 AND [Area_ha]= &amp;lt; 3000 Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Anthony&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 08:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95193#M3308</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2014-09-04T08:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95194#M3309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.  I missed that your code had at least 3 syntax errors.  I overlooked them, because the syntax is so basic.  “AND” is a Logical Operators used to link expressions that evaluate to True or False (See this link for logical operator help&amp;lt;http://msdn.microsoft.com/en-us/library/4ah2h0k3(v=vs.84).aspx&amp;gt;).  You have to use “&amp;gt;=” not “= &amp;gt;”  (See this link for comparison operators&amp;lt;http://msdn.microsoft.com/en-us/library/9hck4s70(v=vs.84).aspx&amp;gt;).  You have to use “ElseIf” not “Else If”  (See this link for If Else Then syntax&amp;lt;http://msdn.microsoft.com/en-us/library/5h27x7e9(v=vs.84).aspx&amp;gt;).  You should study this MSDN website and learn more about VB Script syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If  &amp;lt;= 1000  Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output = "I"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elseif  &amp;gt; 1000 AND  &amp;lt;= 3000 Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output = "II"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elseif  &amp;gt; 3000 AND  &amp;lt;= 5000 Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output = "III"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elseif  &amp;gt; 5000 AND  &amp;lt;= 10000 Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output = "IV"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elseif  &amp;gt; 10000 Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output = "V"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output = "xxx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 08:16:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95194#M3309</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-09-04T08:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculater</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95195#M3310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Richerd Script is working fine&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 08:43:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculater/m-p/95195#M3310</guid>
      <dc:creator>AbhishekMisra</dc:creator>
      <dc:date>2014-09-04T08:43:35Z</dc:date>
    </item>
  </channel>
</rss>

