<?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 Attribute Rule to update M:N relationship table using intersect in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1321838#M1060</link>
    <description>&lt;P&gt;I'm wondering if it would be possible to update a M:N relationship table between a point layer and a polygon layer based on an intersect.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Example:&amp;nbsp; I draw a polygon on a map that represents an area that needs to have tree trimming work.&amp;nbsp; The polygon covers all of the trees (points) that need to be trimmed.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Upon polygon creation I would like the rule to grab the GlobalID all of the intersecting trees and push them to the relationship table and also grab the GlobalID of the polygon and match that in the corresponding rows of the those tree IDs.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason for this is to make it possible to utilize the many to many relationship within an application like Field Maps, which I don't think can be done out of the box.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions!&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 19:01:34 GMT</pubDate>
    <dc:creator>BillMoody</dc:creator>
    <dc:date>2023-08-23T19:01:34Z</dc:date>
    <item>
      <title>Attribute Rule to update M:N relationship table using intersect</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1321838#M1060</link>
      <description>&lt;P&gt;I'm wondering if it would be possible to update a M:N relationship table between a point layer and a polygon layer based on an intersect.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Example:&amp;nbsp; I draw a polygon on a map that represents an area that needs to have tree trimming work.&amp;nbsp; The polygon covers all of the trees (points) that need to be trimmed.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Upon polygon creation I would like the rule to grab the GlobalID all of the intersecting trees and push them to the relationship table and also grab the GlobalID of the polygon and match that in the corresponding rows of the those tree IDs.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason for this is to make it possible to utilize the many to many relationship within an application like Field Maps, which I don't think can be done out of the box.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 19:01:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1321838#M1060</guid>
      <dc:creator>BillMoody</dc:creator>
      <dc:date>2023-08-23T19:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to update M:N relationship table using intersect</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1321929#M1061</link>
      <description>&lt;P&gt;Yes it is possible by returning an edit dictionary against the attributed relationshipclass table, here is a sample filegdb .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6335446718112w1228h540r473" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6335446718112" 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-6335446718112w1228h540r473');  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/6335446718112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByName($datastore, "tree");
var fsInt = intersects(fs, $feature);
var payload = [];
var c = 0;
for (var t in fsInt)
{
     payload[c++] = {"attributes": { "treeGUID":  t.globalid, "areaGUID": $feature.globalid} }
} 


return {
     "edit": [{"className": "tree_trimarea",
                "adds": payload
              }]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 21:26:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1321929#M1061</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2023-08-23T21:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to update M:N relationship table using intersect</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1322076#M1065</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp; you have quickly become my new hero over the last few days.&amp;nbsp; This works flawlessly!&lt;/P&gt;&lt;P&gt;Quick question:&amp;nbsp; I am not a coder by any means but I understand the majority of the above.&amp;nbsp; I am not grasping what "var c" is doing nor the purpose of the array "[c++]".&amp;nbsp; Could you clarify that variable's purpose as well as what the "++" does to modify it?&amp;nbsp; Just so I have a better understanding in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 12:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1322076#M1065</guid>
      <dc:creator>BillMoody</dc:creator>
      <dc:date>2023-08-24T12:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to update M:N relationship table using intersect</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1322196#M1069</link>
      <description>&lt;P&gt;certainly!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;c is a variable, and when we say c++ this translate to add 1 to the value of c&amp;nbsp;&lt;/P&gt;&lt;P&gt;this whole thing is for us to start building a payload&amp;nbsp;&lt;/P&gt;&lt;P&gt;so essentially each tree gets its own payload&amp;nbsp;&lt;/P&gt;&lt;P&gt;tree 0 -&amp;gt; payload 0&lt;/P&gt;&lt;P&gt;tree 1-&amp;gt; payload 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;and so on..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 16:15:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1322196#M1069</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2023-08-24T16:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to update M:N relationship table using intersect</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1322210#M1071</link>
      <description>&lt;P&gt;Genius!&amp;nbsp; Thank you again for your assistance as well as your tutorials on YouTube.&amp;nbsp; All of this has been extremely helpful&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 16:32:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-update-m-n-relationship-table/m-p/1322210#M1071</guid>
      <dc:creator>BillMoody</dc:creator>
      <dc:date>2023-08-24T16:32:45Z</dc:date>
    </item>
  </channel>
</rss>

