<?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 Update Field with condition not working in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/update-field-with-condition-not-working/m-p/1323184#M4540</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I spent half day and didn't resolve issue. I need to update field Grave if it is null. My code is below. I am using python. I have attached error details. please help!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Logic&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;def myfun(myvalue):&lt;BR /&gt;if myvalue != !ABC_ID!:&lt;BR /&gt;return !ABC_NO!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Grave=myfun(!H_No!)&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2023 20:40:06 GMT</pubDate>
    <dc:creator>rajujee</dc:creator>
    <dc:date>2023-08-28T20:40:06Z</dc:date>
    <item>
      <title>Update Field with condition not working</title>
      <link>https://community.esri.com/t5/arcmap-questions/update-field-with-condition-not-working/m-p/1323184#M4540</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I spent half day and didn't resolve issue. I need to update field Grave if it is null. My code is below. I am using python. I have attached error details. please help!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Logic&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;def myfun(myvalue):&lt;BR /&gt;if myvalue != !ABC_ID!:&lt;BR /&gt;return !ABC_NO!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Grave=myfun(!H_No!)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 20:40:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/update-field-with-condition-not-working/m-p/1323184#M4540</guid>
      <dc:creator>rajujee</dc:creator>
      <dc:date>2023-08-28T20:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Update Field with condition not working</title>
      <link>https://community.esri.com/t5/arcmap-questions/update-field-with-condition-not-working/m-p/1323224#M4541</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/community-help-documents/how-to-insert-code-in-your-post/ta-p/914552" target="_self"&gt;How to insert code...&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;You didn't say what you&amp;nbsp; want to update to if Null.&amp;nbsp; So, this updates to the value in ABC_NO field.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;def myfun(myvalue,retvalue):
    if myvalue is None:
        return retvalue
    else: 
        return myvalue

Field Grave=
    
myfun(!Grave!,!ABC_NO!)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 22:06:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/update-field-with-condition-not-working/m-p/1323224#M4541</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-08-28T22:06:24Z</dc:date>
    </item>
  </channel>
</rss>

