<?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: Attribute rule to update a date field when a single field is attributed in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-a-date-field-when-a/m-p/1154460#M345</link>
    <description>&lt;P&gt;Try incorporating a compare of the original value to the current value...Can make sure that if the RadioID isn't changed then the Install Date will not change. something like:&lt;/P&gt;&lt;P&gt;if (IsEmpty($feature.RadioID) || $feature.RadioID&amp;nbsp; == $originalfeature.RadioID){&lt;BR /&gt;return $feature.Radio_Install_Date&lt;BR /&gt;} else {&lt;BR /&gt;return Date()&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2022 18:50:04 GMT</pubDate>
    <dc:creator>KimberlyGarbade</dc:creator>
    <dc:date>2022-03-16T18:50:04Z</dc:date>
    <item>
      <title>Attribute rule to update a date field when a single field is attributed</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-a-date-field-when-a/m-p/1154425#M344</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Using ArcGIS Enterprise 10.9.1 - Field Maps version 21.4.0. I am wondering someone can assist with an issue I came across in an arcade expression that is intended to update a date field when a single field is attributed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I apply the following attribute rule to my "Radio_Install_Date" field, I would like for today's date to populate in the "Radio_Install_Date" field when the "Radio_ID" field is attributed. This works as planned. The problem comes when I then update any other field within the feature class as that update causes the date in the "Radio_Install_Date" field to update once more since a value is present in the "Radio_ID" field. The updating stops occurring only when the "Radio_ID" field is empty.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, my question is can there be anything added to my expression that would ONLY update the "Radio_Install_Date" field when the "Radio_ID" field is attributed...nothing else?&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//Immediate attribute rule on the feature class
//Triggers: Insert, Update
//Field: Radio_Install_Date

var emptyRadioID = $feature.Radio_ID

if (IsEmpty(emptyRadioID)){
    return emptyRadioID}
else{
    return Date()
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 17:58:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-a-date-field-when-a/m-p/1154425#M344</guid>
      <dc:creator>Terry_Bearb</dc:creator>
      <dc:date>2022-03-16T17:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule to update a date field when a single field is attributed</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-a-date-field-when-a/m-p/1154460#M345</link>
      <description>&lt;P&gt;Try incorporating a compare of the original value to the current value...Can make sure that if the RadioID isn't changed then the Install Date will not change. something like:&lt;/P&gt;&lt;P&gt;if (IsEmpty($feature.RadioID) || $feature.RadioID&amp;nbsp; == $originalfeature.RadioID){&lt;BR /&gt;return $feature.Radio_Install_Date&lt;BR /&gt;} else {&lt;BR /&gt;return Date()&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 18:50:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-a-date-field-when-a/m-p/1154460#M345</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-03-16T18:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule to update a date field when a single field is attributed</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-a-date-field-when-a/m-p/1154482#M346</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/119500"&gt;@KimberlyGarbade&lt;/a&gt;,&amp;nbsp;thank you for the reply. Your recommended edit seems to work well for me, that is exactly what I was looking for. I appreciate your assistance!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 19:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-a-date-field-when-a/m-p/1154482#M346</guid>
      <dc:creator>Terry_Bearb</dc:creator>
      <dc:date>2022-03-16T19:44:36Z</dc:date>
    </item>
  </channel>
</rss>

