<?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 not triggered when creating a related feature in ArcGIS Pro in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182236#M7701</link>
    <description>&lt;P&gt;Thank&amp;nbsp; you very much&amp;nbsp; &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/473911"&gt;@TWickiSLU&lt;/a&gt; for your quick response.&lt;/P&gt;&lt;P&gt;Very likely we will end up applying same "solution".&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 09:52:23 GMT</pubDate>
    <dc:creator>MartinKrál</dc:creator>
    <dc:date>2022-06-13T09:52:23Z</dc:date>
    <item>
      <title>Attribute rule not triggered when creating a related feature in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1148570#M7578</link>
      <description>&lt;P&gt;I created an immediate calculation rule in order to update the field value of the child feature (BOULEVARDFLAECHE) with the corresponding field value of the parent feature (BETRIEB). The rule should be triggered when creating the relationship between the objects. The rule is correctly executed when I create the relationship by entering manually the foreign key (FEATURELINK) in the Attributes pane of the child feature. However, the rule is not executed at all when I create the relation by selecting the objects and using “Add Selected To Relationship”. Some information about the data design:&lt;/P&gt;&lt;P&gt;&lt;U&gt;Feature "BETRIEB" (Point)&lt;/U&gt;&lt;BR /&gt;• Globald (key)&lt;BR /&gt;• OERTLICHEKEIT_ID&lt;BR /&gt;• …&lt;/P&gt;&lt;P&gt;&lt;U&gt;Feature "BOULEVARDFLAECHE" (Polygon)&lt;/U&gt;&lt;BR /&gt;• GlobalID&lt;BR /&gt;• FEATURELINK (key)&lt;BR /&gt;• OERTLICHKEIT_ID (the attribute rule should update this value)&lt;/P&gt;&lt;P&gt;&lt;U&gt;Relationship setting:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;• "origin_table": "BETRIEB",&lt;BR /&gt;• "destination_table": "BOULEVARDFLAECHE",&lt;BR /&gt;• "out_relationship_class": "BETRIEB_BOULEVARDFLAECHE_REL",&lt;BR /&gt;• "relationship_type": "COMPOSITE",&lt;BR /&gt;• "message_direction": "FORWARD",&lt;BR /&gt;• "cardinality": "ONE_TO_MANY",&lt;BR /&gt;• "origin_primary_key": "GlobalId",&lt;BR /&gt;• "origin_foreign_key": "FEATURELINK"&lt;/P&gt;&lt;P&gt;&lt;U&gt;Attribute Rule:&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Feature: BOULEVARDFLAECHE&lt;BR /&gt;Field: OERTLICHKEIT_ID&lt;/LI&gt;&lt;LI&gt;Triggers: Insert, Update&lt;/LI&gt;&lt;LI&gt;Exclude from application evaluation&lt;/LI&gt;&lt;LI&gt;Expression:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;var orgFeaturelink = $originalFeature.FEATURELINK;

var newFeaturelink = $feature.FEATURELINK;

if (newFeaturelink != orgFeaturelink){

    if (IsEmpty(newFeaturelink)) return NULL;

    var betrieb = FeatureSetByName($datastore,'STAV_ELICET.STAV_ELICET.BETRIEB',['OERTLICHKEIT_ID', 'GlobalID'],false);

    var betrieb_parents = Filter(betrieb, 'GlobalID = @newFeaturelink');

    if (Count(betrieb_parents)&amp;gt;0) {

        return First(betrieb_parents).OERTLICHKEIT_ID

    } else {

        return {'errorMessage': 'No referenced parent feature could be found.'}

    }

} else {

    return $feature.OERTLICHKEIT_ID

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope I was able to explain my problem clearly. Somehow the rule does not realize that the field FEATURELINK has changed when the relation is established by using “add selected to Relationship”.&lt;/P&gt;&lt;P&gt;Background: I need the field OERTLICHKEIT_ID as part of a workaround to the known BUG-000146585 when creating related features in Web AppBuilder and also because of the styling reasons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 14:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1148570#M7578</guid>
      <dc:creator>TWickiSLU</dc:creator>
      <dc:date>2022-02-28T14:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule not triggered when creating a related feature in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182218#M7699</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/473911"&gt;@TWickiSLU&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems to me,&amp;nbsp; that we are in same trouble with "Add Selected To Relationship" and atrribute rule&amp;nbsp; as you described here .&lt;/P&gt;&lt;P&gt;Please, did you found out what was problem in your case, or was there any solution to it?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 08:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182218#M7699</guid>
      <dc:creator>MartinKrál</dc:creator>
      <dc:date>2022-06-13T08:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule not triggered when creating a related feature in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182235#M7700</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;No, unfortunately I did not find a satisfactory solution. ESRI support gave me the following answer:&lt;/P&gt;&lt;P&gt;«Problem was: attribute rules were not triggered by 'add selected to relationship' (in the attribute pane when editing). 'add selected to relationship' cannot be used to trigger ‘immediate attribute calculation rules'. Performing this action does not directly update the feature class, but only changes the reference of the ID set in the relationship. The relationship class is edited by 'add selected to relationship' and not directly the target class, here the updated value is only reflected» (translated from german to english)&lt;/P&gt;&lt;P&gt;In my case, I changed the workflow in the following way: Instead of using "add selected to relationship", the user must enter the «OERTLICHEKEIT_ID» in both the parent and child feature. After saving the child feature, a calculation rule is executed that fills in the FETURELINK to the parent feature with the same «OERTLICHEKEIT_ID» (see video). Entering the value («OERTLICHEKEIT_ID») directly in the target feature (child feature) allows to trigger immediate attribute rules. However, it’s not a very nice solution.&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6307675685112w1108h540r280" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6307675685112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6307675685112w1108h540r280');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6307675685112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 09:34:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182235#M7700</guid>
      <dc:creator>TWickiSLU</dc:creator>
      <dc:date>2022-06-13T09:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule not triggered when creating a related feature in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182236#M7701</link>
      <description>&lt;P&gt;Thank&amp;nbsp; you very much&amp;nbsp; &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/473911"&gt;@TWickiSLU&lt;/a&gt; for your quick response.&lt;/P&gt;&lt;P&gt;Very likely we will end up applying same "solution".&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 09:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182236#M7701</guid>
      <dc:creator>MartinKrál</dc:creator>
      <dc:date>2022-06-13T09:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule not triggered when creating a related feature in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182239#M7702</link>
      <description>&lt;P&gt;Please inform me if you find another solution or workaround &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regrads&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 09:55:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-not-triggered-when-creating-a/m-p/1182239#M7702</guid>
      <dc:creator>TWickiSLU</dc:creator>
      <dc:date>2022-06-13T09:55:43Z</dc:date>
    </item>
  </channel>
</rss>

