<?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: The calculated value is invalid for the row with object id = 1 in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576849#M3892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you're running into the error because your expression does not return anything for certain cases, where the value is &amp;lt;= 299. Add an 'else' statement to always return a value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;if ([Summary_Statistics_2.SUM_DrainArea_SF]) &amp;gt; 299 then&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;n = "MAJOR"&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;else&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;n = ""&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Apr 2016 18:08:42 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2016-04-04T18:08:42Z</dc:date>
    <item>
      <title>The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576846#M3889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently running a large model and when I get to the part where there is a field calculation needed, it gives me this error. If I choose to continue running the model, it continues fine. It just seems to be at this part that the field calculation gets hung up. The problem occurs with the first row of data, which is no different from any of the other rows of data. Has anyone else ever had this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 14:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576846#M3889</guid>
      <dc:creator>ZachHewitt1</dc:creator>
      <dc:date>2016-04-04T14:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576847#M3890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide more information.&amp;nbsp; For example, what is the expression you are using for the field calculation?&amp;nbsp; Could you also provide the value(s) of the field(s) you are using in the expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 16:40:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576847#M3890</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2016-04-04T16:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576848#M3891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression I am using goes as follows: &lt;/P&gt;&lt;P&gt;Dim n&lt;/P&gt;&lt;P&gt;if ([Summary_Statistics_2.SUM_DrainArea_SF]) &amp;gt; 299 then&lt;/P&gt;&lt;P&gt;n = "MAJOR"&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Summary_Statistics_2.SUM_DrainArea_SF field is a double field type and the variable of n is a string field type. Based off of what number is in the Summary_Statistics_2.SUM_DrainArea_SF, the variable is populated with one of four choices, Major, Minor, Xconnect or Compliant. When the error pops up I can choose to continue to run the model, and if I do the rest of the rows get the field populated with data. It seems to only happen to the first row that the tool hits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:02:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576848#M3891</guid>
      <dc:creator>ZachHewitt1</dc:creator>
      <dc:date>2016-04-04T18:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576849#M3892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you're running into the error because your expression does not return anything for certain cases, where the value is &amp;lt;= 299. Add an 'else' statement to always return a value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;if ([Summary_Statistics_2.SUM_DrainArea_SF]) &amp;gt; 299 then&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;n = "MAJOR"&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;else&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;n = ""&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:08:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576849#M3892</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2016-04-04T18:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576850#M3893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dim is not necessary anymore with VB Script.&amp;nbsp; You have to have an else clause to output a value when the condition you have written is not met.&amp;nbsp; Every record has to have an output.&amp;nbsp; So change the calculation to the following where you replace [OUTPUT_FIELD] with the actual name of the Output Field (so that whatever is already in the output field is not changed):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parser: VB Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Codeblock: checked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pre-Logic Codeblock:&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;if ([Summary_Statistics_2.SUM_DrainArea_SF]) &amp;gt; 299 then&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;n = "MAJOR"&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;else&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;n = [OUTPUT_FIELD]&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field expression: n&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:12:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576850#M3893</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2016-04-04T18:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576851#M3894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within my model I have three sections of code. The second section overrides the first and the third section overrides the second. There is an else statement in the first section of code within the model. Here are the three sections of code, in order from 1 to 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim n&lt;/P&gt;&lt;P&gt;if (([SummaryStatistics.SUM_DrainArea_SF]) &amp;gt; 0 And ([SummaryStatistics.SUM_DrainArea_SF])) &amp;lt;= 299 then&lt;/P&gt;&lt;P&gt;n = "MINOR"&lt;/P&gt;&lt;P&gt;else n = "COMPLIANT"&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim n&lt;/P&gt;&lt;P&gt;if [Lat_Defects.ProposedWork] = "35" then&lt;/P&gt;&lt;P&gt;n = "XCONNECT"&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim n&lt;/P&gt;&lt;P&gt;if ([Summary_Statistics_2.SUM_DrainArea_SF]) &amp;gt; 299 then&lt;/P&gt;&lt;P&gt;n = "MAJOR"&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In between these code sections there are other things going on but there are no other field calculations. There are simple things like Add Joins and Remove Joins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:28:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576851#M3894</guid>
      <dc:creator>ZachHewitt1</dc:creator>
      <dc:date>2016-04-04T18:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576852#M3895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the Dim statements.&amp;nbsp; If this is all one calcuation, they cause the n variable to be reset before each section so the first and second section calculations are destroyed and overridden even when the condition of clause 3 is not met.&amp;nbsp; Dim is useless in VB script and not to be used ever.&amp;nbsp; If these are separate calculations they all need an else clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:33:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576852#M3895</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2016-04-04T18:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576853#M3896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still running 10.2 so does that statement hold true for removing the Dim statements? Also, doesn't the Dim declare what my variable is?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:38:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576853#M3896</guid>
      <dc:creator>ZachHewitt1</dc:creator>
      <dc:date>2016-04-04T18:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576854#M3897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dim was only useful when VBA was used in the field calculator prior to 10.0, since VBA has several types of variables that can be instantiated by the Dim clause.&amp;nbsp; After 10.0 calculations use VB Script and there is only one type of variable, so just by assigning a variable a value it is given a variable name and type without using the Dim clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:42:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576854#M3897</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2016-04-04T18:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576855#M3898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I removed the Dim statements from the script and I am still hitting that error in the last section of code. It is saying that the Calculated Value is Invalid for the row with object id = 84 in this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576855#M3898</guid>
      <dc:creator>ZachHewitt1</dc:creator>
      <dc:date>2016-04-04T18:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576856#M3899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am assuming this is all one calculation.&amp;nbsp; Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;if (([SummaryStatistics.SUM_DrainArea_SF]) &amp;gt; 0 And ([SummaryStatistics.SUM_DrainArea_SF])) &amp;lt;= 299 then&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;n = "MINOR"&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;else&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;n = "COMPLIANT"&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;end if&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;if [Lat_Defects.ProposedWork] = "35" then&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;n = "XCONNECT"&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;if ([Summary_Statistics_2.SUM_DrainArea_SF]) &amp;gt; 299 then&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;n = "MAJOR"&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;end if&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;Make sure your output field is text and at least 9 characters long so that it can hold the value "COMPLIANT".&amp;nbsp; If it is less than 9 characters long it will throw an error.&amp;nbsp; Are you sure all records in Lat_Defects have a matching record in both Summary_Statistics and Summary_Statistics_2?&amp;nbsp; Are you sure none of these 3 fields have Null values?&amp;nbsp; If any of them have an unmatched record or a Null value that will throw an error.&amp;nbsp; Have you checked that the join worked for both tables on the record with ObjectID 84 in the main table, especially if this is a 3-table join?&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #000000;"&gt;If you still have problems, you are going to have to at least post a screen shot of your data with the join in place, since it in not fair to ask us about errors that only occur for specific records if we cannot see those records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 19:11:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576856#M3899</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2016-04-04T19:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576857#M3900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like the question is well handled.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wanted to make a small observing comment.&amp;nbsp; I still find it a good idea to explicitly define/dimension all variables.&amp;nbsp; A lot of nasty type conversion errors can be avoided by explicitly knowing what type of variable you wish filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another observation:&amp;nbsp;&amp;nbsp; Dim n&amp;nbsp;&amp;nbsp; "is not a string, integer, double or object"&amp;nbsp;&amp;nbsp; In vb it is a "Variant" which could be any of all types.&amp;nbsp; I generally avoid variants except when I do not know what type of data that is being received into the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 14:57:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576857#M3900</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2016-04-05T14:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576858#M3901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Field Calculator uses VB Script which only supports type Variant.&amp;nbsp; If you try to Dim to any other type like string, integer, double, object, etc. an error will be thrown.&amp;nbsp; Using Dim is only a good practice in VBA or VB.Net, not VB Script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 15:01:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576858#M3901</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2016-04-05T15:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576859#M3902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New to me,&amp;nbsp; I am looking at various vbscripts I use with Dim statements....&lt;/P&gt;&lt;P&gt;Option Explicit&lt;/P&gt;&lt;P&gt;Dim MyArray()&lt;/P&gt;&lt;P&gt;ReDim AnotherArray().....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not disagree with VB Script using only Variant... properly Dim statements work and is good programming practice and helpful in debuging even VB Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple example of why DIM is good programming practice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;StudentFinalGrade = 100&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;StudentHomeworkGrade = 100&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;StudentCourseGrade = ((StudentFialnGrade + StudentHomeworkGrade)/200)*100&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;(Will not produce an error but is incorrect and the answer is wrong)&amp;nbsp; Difficult to debug&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Option Explicit&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dim StudentFinalGrade, StudentHomeworkGrade&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;StudentFinalGrade = 100&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;StudentHomeworkGrade = 100&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;StudentCourseGrade = ((StudentFialnGrade + StudentHomeworkGrade)/200)*100&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Will produce an error and the error is obvious [StudentFialnGrade should be StudentFinalGrade&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 14:18:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576859#M3902</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2016-04-06T14:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576860#M3903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could just as easily directly assign those variable names in VB Script without a Dim statement to an empty array at any point in my calculation, unlike VBA aand VB.Net where errors would occur if I did not explicitly cast the array to a real type, i.e, Dim MyArray() as String.&amp;nbsp; Using the syntax of VBA and VB.Net of Dim MyArray() as String throws an error and was the sole reason for months of posts on the forum after the release of 10.0 saying "My calculation broke at 10.0 and I don't know why".&amp;nbsp; So I stopped using it and have not had a problem debugging my calculations as a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Option Explicit has never been discussed on the forum that I can recall and I was unaware it had any effect in VB Script, so I never tried it.&amp;nbsp; That practice is not well established in any posts here on the forum or in the VB Script help.&amp;nbsp; Without the inclusion of that option, the use of Dim makes no difference.&amp;nbsp; So you needed to say that the use of Option Explicit is a good practice in conjunction with Dim, otherwise the statement about the value of Dim is misleading&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, this user was misusing Dim by including it multiple times for the same variable name in his calculation.&amp;nbsp; That resets the variable, breaks the logic of having successive if statements and led to errors in the calculation, so using Dim like that is definitely a bad practice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 14:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576860#M3903</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2016-04-06T14:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: The calculated value is invalid for the row with object id = 1</title>
      <link>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576861#M3904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 15:09:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/the-calculated-value-is-invalid-for-the-row-with/m-p/576861#M3904</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2016-04-06T15:09:15Z</dc:date>
    </item>
  </channel>
</rss>

