<?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 Association Already Exists, Duplicate Association Found Error ! in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/association-already-exists-duplicate-association/m-p/1161960#M390</link>
    <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have a data model with a utility network in it.&amp;nbsp;I wrote a rule that will establish an attachment association between poles (structurejunction) and connection points (electricjunction).&amp;nbsp;I configured it to trigger on update instant. But I couldn't get rid of getting the following error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error It points to a different attachment association that is always present.&lt;/P&gt;&lt;P&gt;where am i making a mistake?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="association exists.jpg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38311iBBAB033C7D530E2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="association exists.jpg" alt="association exists.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//$feature is an ElectricJunction
var sjFeatureSet = FeatureSetByname($datastore, "StructureJunction", ["objectid"] ,false)
// Asset Group 101-102-103-104-105
// Asset Type 
var polesFeatureSet = Filter(sjFeatureSet, "ASSETGROUP in (101,102,103,104,105) AND ASSETTYPE in (110,111,112,120,121,122,130,131,132,133,134,381,382,383,470,471,473,474,475,476,477,478,479,480,481,482)")
//buffer
var g = buffer($feature, 1)

var intersectedPoles = Intersects(polesFeatureSet,g)

if (count(intersectedPoles) == 0) 
  return $feature.notes;

var pole = first(intersectedPoles)

return {

         "result": $feature.notes,
         "edit": 
              [
                {
                 "className": "structurejunction",

                 "updates":
                 [
                   {
                   "objectID": pole.objectid,
                   "associationType": 'structure'
                   }
                 ]
                }
              ]
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 07:07:23 GMT</pubDate>
    <dc:creator>GIS_Solutions</dc:creator>
    <dc:date>2022-04-07T07:07:23Z</dc:date>
    <item>
      <title>Association Already Exists, Duplicate Association Found Error !</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/association-already-exists-duplicate-association/m-p/1161960#M390</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have a data model with a utility network in it.&amp;nbsp;I wrote a rule that will establish an attachment association between poles (structurejunction) and connection points (electricjunction).&amp;nbsp;I configured it to trigger on update instant. But I couldn't get rid of getting the following error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error It points to a different attachment association that is always present.&lt;/P&gt;&lt;P&gt;where am i making a mistake?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="association exists.jpg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38311iBBAB033C7D530E2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="association exists.jpg" alt="association exists.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//$feature is an ElectricJunction
var sjFeatureSet = FeatureSetByname($datastore, "StructureJunction", ["objectid"] ,false)
// Asset Group 101-102-103-104-105
// Asset Type 
var polesFeatureSet = Filter(sjFeatureSet, "ASSETGROUP in (101,102,103,104,105) AND ASSETTYPE in (110,111,112,120,121,122,130,131,132,133,134,381,382,383,470,471,473,474,475,476,477,478,479,480,481,482)")
//buffer
var g = buffer($feature, 1)

var intersectedPoles = Intersects(polesFeatureSet,g)

if (count(intersectedPoles) == 0) 
  return $feature.notes;

var pole = first(intersectedPoles)

return {

         "result": $feature.notes,
         "edit": 
              [
                {
                 "className": "structurejunction",

                 "updates":
                 [
                   {
                   "objectID": pole.objectid,
                   "associationType": 'structure'
                   }
                 ]
                }
              ]
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 07:07:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/association-already-exists-duplicate-association/m-p/1161960#M390</guid>
      <dc:creator>GIS_Solutions</dc:creator>
      <dc:date>2022-04-07T07:07:23Z</dc:date>
    </item>
  </channel>
</rss>

