<?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 based on another field in Table in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274062#M15754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes, I am doing this all in Field Calculator, I right clicked the field I want to calculate, selected and equals symbol, and double clicked the Invert Elevation field from the joined table, that's it. I am using 10.1 and it is an ArcSDE database.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jan 2014 13:56:01 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-01-10T13:56:01Z</dc:date>
    <item>
      <title>Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274058#M15750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Howdy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have joined a sewer Gravity Main (pipes) table to my Manholes table based on [From_Manhole]. My next step was using the field calculator set the values of [Upstream_Elevation] in my Gravity Mains table equal to the values of [Invert_Elevation] from the joined Manholes table. However, when I try to execute this function, I get an error message. Am I using the right expression? The input field and destination fields are both Double with a precision of 38... not sure if this matters? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what the geoprocessing results showed me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;infrastructure.PUBLICWORKS.ssGravityMain.Upstream_Elev= [infrastructure.PUBLICWORKS.ssManhole.INVERTELEV]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;General Error executing calculator&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 9999999&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Syntax error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:29:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274058#M15750</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-10T13:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274059#M15751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Howdy,&lt;BR /&gt;&lt;BR /&gt;I have joined a sewer Gravity Main (pipes) table to my Manholes table based on [From_Manhole]. My next step was using the field calculator set the values of [Upstream_Elevation] in my Gravity Mains table equal to the values of [Invert_Elevation] from the joined Manholes table. However, when I try to execute this function, I get an error message. Am I using the right expression? The input field and destination fields are both Double with a precision of 38... not sure if this matters? &lt;BR /&gt;&lt;BR /&gt;Here is what the geoprocessing results showed me:&lt;BR /&gt;&lt;BR /&gt;infrastructure.PUBLICWORKS.ssGravityMain.Upstream_Elev= [infrastructure.PUBLICWORKS.ssManhole.INVERTELEV]&lt;BR /&gt;&lt;BR /&gt;General Error executing calculator&lt;BR /&gt;ERROR 9999999&lt;BR /&gt;Syntax error&lt;BR /&gt;Failed to execute&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;All you should need is the input field in the brackets in the expression of the Field Calculator chosen from the field name list. I.e.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[infrastructure.PUBLICWORKS.ssManhole.INVERTELEV]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You don't put the target field in the calculation expression, you just right click the field you want the calculation to update to initiate a Field Calculation on it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274059#M15751</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-01-10T13:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274060#M15752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, sorry if I didnt make that clear. I did right click UpstreamElevation field and selected = [infrastructure.PUBLICWORKS.ssManhole.INVERTELEV] as the input&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:46:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274060#M15752</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-10T13:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274061#M15753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What version of ArcGIS are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you performing this operation in the Field Calculator tool of ArcMap?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the Scale property for both double precision fields also the same?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274061#M15753</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-10T13:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274062#M15754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes, I am doing this all in Field Calculator, I right clicked the field I want to calculate, selected and equals symbol, and double clicked the Invert Elevation field from the joined table, that's it. I am using 10.1 and it is an ArcSDE database.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274062#M15754</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-10T13:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274063#M15755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;the precision and scale are both the same&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Precision is 38&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Scale is 8&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:57:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274063#M15755</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-10T13:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274064#M15756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got it, ha! I must do not need the equals symbol in the expression&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;syntax, syntax, syntax.... doh!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:01:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274064#M15756</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-10T14:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274065#M15757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you need to perform this type of operation when new sewer information is provided to you (collected)?&amp;nbsp; If so, you might want to consider making a model and exporting it to python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:04:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274065#M15757</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-10T14:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274066#M15758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to write an If then statement in the Field Calculator?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ie. If the UpstreamElevation is &amp;lt;Null&amp;gt; then UpstreamElev=InvertElev&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This way I dont overwrite values in the Upstream Elevation field that are already in there?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:05:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274066#M15758</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-10T14:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274067#M15759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do not use an equal sign in the calculation expression.&amp;nbsp; That is assumed and only applies if you wanted a True/False result from the calculation (requiring both side of the = expression to have values).&amp;nbsp; You don't want that.&amp;nbsp; All that should be in the expression is the bracketed field name inserted by the field list.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:12:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274067#M15759</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-01-10T14:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274068#M15760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there a way to write an If then statement in the Field Calculator?&lt;BR /&gt; ie. If the UpstreamElevation is &amp;lt;Null&amp;gt; then UpstreamElev=InvertElev&lt;BR /&gt;&lt;BR /&gt;This way I dont overwrite values in the Upstream Elevation field that are already in there?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This requires that you check the box to allow for a codeblock located just above the expression text box.&amp;nbsp; This will create two entry textboxes, with the top one being for code and the bottom one being the output to the field.&amp;nbsp; I would do it this way in VB Script (Python can also do it but I am a VB guy)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Parser: VB Script&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use Codeblock: checked&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pre-Logic Codeblock:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If IsNull([UpstreamElev]) Then
&amp;nbsp; Output = [InvertElev]
Else
&amp;nbsp; Output = [UpstreamElev]
End If&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression:&amp;nbsp; Output&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the bracketed field names in the Pre-Logic Codeblock replace them with whatever the field list inserts to handle the join qualification of the field names.&amp;nbsp; You have to output a value for every record, so the only way to prevent an error or a change to an existing value is to overwrite the existing value with itself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:22:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274068#M15760</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-11T13:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274069#M15761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for all the help! I appreciate it&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:31:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274069#M15761</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-10T14:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274070#M15762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This requires that you check the box to allow for a codeblock located just above the expression text box.&amp;nbsp; This will create two entry textboxes, with the top one being for code and the bottom one being the output to the field.&amp;nbsp; I would do it this way in VB Script (Python can also do it but I am a VB guy)&lt;BR /&gt;&lt;BR /&gt;Parser: VB Script&lt;BR /&gt;&lt;BR /&gt;Use Codeblock: checked&lt;BR /&gt;&lt;BR /&gt;Pre-Logic Codeblock:&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;[ATTACH=CONFIG]30393[/ATTACH]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Expression:&amp;nbsp; Output&lt;BR /&gt;&lt;BR /&gt;For the bracketed field names in the Pre-Logic Codeblock replace them with whatever the field list inserts to handle the join qualification of the field names.&amp;nbsp; You have to output a value for every record, so the only way to prevent an error or a change to an existing value is to overwrite the existing value with itself.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, my lacking scripting/syntax knowledge is what holds me back here. Here is what I am putting in as directed, yet the values are not calculated. Did I enter the right field in the output?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 16:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274070#M15762</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-10T16:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator based on another field in Table</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274071#M15763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Sorry, my lacking scripting/syntax knowledge is what holds me back here. Here is what I am putting in as directed, yet the values are not calculated. Did I enter the right field in the output?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The second text box is wrong.&amp;nbsp; It should just have the word &lt;/SPAN&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;&lt;SPAN&gt; in it.&amp;nbsp; Output is a variable name and the calculation will substitute that name with the appropriate value determined by the codeblock logic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By putting the calculated field name into the output textbox the codeblock logic was totally ignored and instead every value already in the field just overwrote itself with the same value that it already had.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 16:23:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-based-on-another-field-in-table/m-p/274071#M15763</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-01-10T16:23:32Z</dc:date>
    </item>
  </channel>
</rss>

