<?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 for editor tracking? in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-editor-tracking/m-p/1021440#M79</link>
    <description>&lt;P&gt;Thank you Johannes for your help&lt;/P&gt;&lt;P&gt;I will try this!&lt;/P&gt;&lt;P&gt;Jessica&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2021 09:33:56 GMT</pubDate>
    <dc:creator>JessicaEdberg</dc:creator>
    <dc:date>2021-01-29T09:33:56Z</dc:date>
    <item>
      <title>Attribute Rule for editor tracking?</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-editor-tracking/m-p/1021401#M77</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need help to create an attribute rule that can write the value of now() in an attribute field called Attribute_changed when an attribute is changed for an object, and write the value of now() in an attribute field called Geometry_changed if the geometry of an object is changed. I dont think this is possible to specify when I'm useing Editor Tracking in the geodatabas so I want to try use attribute rules. Is it possible to do this with attribute rules and do anybody know how?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use ArcGIS Pro 2.6.3.&lt;/P&gt;&lt;P&gt;Sincerely Jessica&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 06:34:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-editor-tracking/m-p/1021401#M77</guid>
      <dc:creator>JessicaEdberg</dc:creator>
      <dc:date>2021-01-29T06:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule for editor tracking?</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-editor-tracking/m-p/1021429#M78</link>
      <description>&lt;P&gt;For now, you'll have to define two rules for that, according to &lt;A href="https://community.esri.com/t5/attribute-rules-videos/update-multiple-fields-with-a-single-attribute-rule/m-p/1016597" target="_blank" rel="noopener"&gt;this post&lt;/A&gt; , they can be combined into one rule in ArcGIS Pro 2.7.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Rule: TrackAttributeEdits
// Field: AttributeChanged
// Triggers: Insert, Update


// new entry
if(IsEmpty($originalfeature["AttributeChanged"])) {
  return Now()
}
// define the checked attributes as [ [old, new] ]
// do not put things like Shape, AttributeChanged, GeometryChanged or editor tracking fields here!
var monitored_attributes = [
  [$originalfeature["Attribute1"], $feature["Attribute1"]],
  [$originalfeature["Attribute2"], $feature["Attribute2"]],
]
// check those attributes, return Now() at the first changed one
for(var a in monitored_attributes) {
  var old_att = monitored_attributes[a][0]
  var new_att = monitored_attributes[a][1]
  if(old_att != new_att) {
    return Now()
  }
}
// nothing changed
return $feature["AttributeChanged"]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Rule: TrackGeometryEdits
// Field: GeometryChanged
// Triggers: Insert, Update


// new entry
if(IsEmpty(Geometry($originalfeature))) {
  return Now()
}
// compare geometries
var old_geo = Geometry($originalfeature)
var new_geo = Geometry($feature)
if(!Equals(old_geo, new_geo)) {
  return Now()
}
// nothing changed
return $feature["GeometryChanged"]&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Jan 2021 09:06:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-editor-tracking/m-p/1021429#M78</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-01-29T09:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule for editor tracking?</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-editor-tracking/m-p/1021440#M79</link>
      <description>&lt;P&gt;Thank you Johannes for your help&lt;/P&gt;&lt;P&gt;I will try this!&lt;/P&gt;&lt;P&gt;Jessica&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 09:33:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-editor-tracking/m-p/1021440#M79</guid>
      <dc:creator>JessicaEdberg</dc:creator>
      <dc:date>2021-01-29T09:33:56Z</dc:date>
    </item>
  </channel>
</rss>

