<?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: CalculateField Expression Not Working in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/calculatefield-expression-not-working/m-p/1591671#M11196</link>
    <description>&lt;P&gt;Cody&lt;/P&gt;&lt;P&gt;Shortly after posting this issue I tried a new route and it worked.&amp;nbsp; As stated, I'm new to ArcPy so I did not realize there is an arcpy.CalculateField class and an arcpy.CalculateField&lt;STRONG&gt;s&amp;nbsp;&lt;/STRONG&gt;(plural) class.&amp;nbsp; Using arcpy.CalculateField&lt;STRONG&gt;s&amp;nbsp;&lt;/STRONG&gt;solved the issue&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2025 14:34:49 GMT</pubDate>
    <dc:creator>MarkMcDill</dc:creator>
    <dc:date>2025-03-04T14:34:49Z</dc:date>
    <item>
      <title>CalculateField Expression Not Working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/calculatefield-expression-not-working/m-p/1590815#M11188</link>
      <description>&lt;P&gt;I am new to ArcGIS and the ArcPY Module; recently I've run into an issue with ArcPY losing resolution to an object (a feature class) that I know exists.&amp;nbsp; Error: name '&amp;lt;variable name&amp;gt;' is not defined (where &amp;lt;variable name&amp;gt; is the object/feature class to which I'm referring).&lt;/P&gt;&lt;P&gt;The '&amp;lt;variable name&amp;gt;' can be accessed prior to the CalculateField execution in other ArcPY tools.&lt;/P&gt;&lt;P&gt;Also, the expression that I'm using in&amp;nbsp;CalculateField was built and tested in both&amp;nbsp;CalculateField ArcGIS Pro geoprocessing pane and in the python window in pro.&lt;/P&gt;&lt;P&gt;The feature class is created and then joined to a local feature class based on a couple conditions -- that join is successful; however, when attempting to create an expression of which part of the expression refers to the feature class, I get the error (name '&amp;lt;variable name&amp;gt;' is not defined) in the&amp;nbsp;CalculateField tool&lt;/P&gt;&lt;P&gt;An alternate solution was to use UpdateCursor, but it states that it cannot update a joined table.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 17:32:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/calculatefield-expression-not-working/m-p/1590815#M11188</guid>
      <dc:creator>MarkMcDill</dc:creator>
      <dc:date>2025-02-28T17:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: CalculateField Expression Not Working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/calculatefield-expression-not-working/m-p/1590848#M11189</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/885893"&gt;@MarkMcDill&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible to share a snippet of the code referenced along with a screenshot of the error maybe? We'd be able to get a nice look into how the program is interacting.&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 18:14:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/calculatefield-expression-not-working/m-p/1590848#M11189</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2025-02-28T18:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: CalculateField Expression Not Working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/calculatefield-expression-not-working/m-p/1591671#M11196</link>
      <description>&lt;P&gt;Cody&lt;/P&gt;&lt;P&gt;Shortly after posting this issue I tried a new route and it worked.&amp;nbsp; As stated, I'm new to ArcPy so I did not realize there is an arcpy.CalculateField class and an arcpy.CalculateField&lt;STRONG&gt;s&amp;nbsp;&lt;/STRONG&gt;(plural) class.&amp;nbsp; Using arcpy.CalculateField&lt;STRONG&gt;s&amp;nbsp;&lt;/STRONG&gt;solved the issue&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 14:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/calculatefield-expression-not-working/m-p/1591671#M11196</guid>
      <dc:creator>MarkMcDill</dc:creator>
      <dc:date>2025-03-04T14:34:49Z</dc:date>
    </item>
  </channel>
</rss>

