<?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 How to set the right terminal when creating connectivity associations with attribute rules in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1199115#M503</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;this is my attribute rule. It seems to work fine, but i can not set the right terminal. I tried different things but I get always errors.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if ($feature.assetgroup == 1001) {&lt;BR /&gt;var update_class = 'ElectricDevice'&lt;BR /&gt;var filterDevice = "ASSETGROUP = 854 And DIRECTION = 'Voeding OV'"&lt;/P&gt;&lt;P&gt;var boundaries = FeatureSetByName($datastore, "FLUVIUS_109_DESIGN2.UTARC.StructureBoundary", ["globalid"], true);&lt;BR /&gt;if(isempty(boundaries)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 1"};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var intersectBoundaries = Intersects(boundaries, $feature);&lt;BR /&gt;if(isempty(intersectBoundaries)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 2"};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var structureBoundary = First(intersectBoundaries);&lt;BR /&gt;if(isempty(structureBoundary)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 3"};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var AllDevices = FeatureSetByName($datastore, "FLUVIUS_109_DESIGN2.UTARC.ElectricDevice", ["assetgroup", "globalid"], true);&lt;BR /&gt;if(isempty(AllDevices)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 4"};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var XYDevice = Filter(AllDevices, filterDevice)&lt;BR /&gt;if(isempty(XYDevice)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 5"};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var intersectDevice = Intersects(XYDevice, structureBoundary);&lt;BR /&gt;if(isempty(intersectBoundaries)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 6"};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var DeviceGeo = First(intersectDevice)&lt;BR /&gt;if(isempty(DeviceGeo)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 7"};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;return {&lt;BR /&gt;"edit":&lt;BR /&gt;[&lt;BR /&gt;{"className": update_class,&lt;BR /&gt;"updates":[{"globalid": DeviceGeo.globalid,&lt;BR /&gt;"FROMTERMINALID": 13,&lt;BR /&gt;"associationType":"connected"}]}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have tried:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-"fromTerminal": "13"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterStampfl_1-1659553935836.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47716iFCBAC60376D3754D/image-size/large?v=v2&amp;amp;px=999" role="button" title="PeterStampfl_1-1659553935836.png" alt="PeterStampfl_1-1659553935836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- "fromTerminal": 13&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterStampfl_2-1659553960114.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47717i95CB5AEEF3524729/image-size/large?v=v2&amp;amp;px=999" role="button" title="PeterStampfl_2-1659553960114.png" alt="PeterStampfl_2-1659553960114.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- "FROMTERMINALID": 13&lt;/P&gt;&lt;P&gt;I get a association without error but, I have topology errors and the terminal is set FromTerminalID 1 ToTerminalID 1&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterStampfl_3-1659554294320.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47719i97E74F0E5719AF15/image-size/large?v=v2&amp;amp;px=999" role="button" title="PeterStampfl_3-1659554294320.png" alt="PeterStampfl_3-1659554294320.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The association rule looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterStampfl_4-1659554326519.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47720i5B230F23F6CAA9D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="PeterStampfl_4-1659554326519.png" alt="PeterStampfl_4-1659554326519.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 19:24:31 GMT</pubDate>
    <dc:creator>PeterStampfl</dc:creator>
    <dc:date>2022-08-03T19:24:31Z</dc:date>
    <item>
      <title>How to set the right terminal when creating connectivity associations with attribute rules</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1199115#M503</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;this is my attribute rule. It seems to work fine, but i can not set the right terminal. I tried different things but I get always errors.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if ($feature.assetgroup == 1001) {&lt;BR /&gt;var update_class = 'ElectricDevice'&lt;BR /&gt;var filterDevice = "ASSETGROUP = 854 And DIRECTION = 'Voeding OV'"&lt;/P&gt;&lt;P&gt;var boundaries = FeatureSetByName($datastore, "FLUVIUS_109_DESIGN2.UTARC.StructureBoundary", ["globalid"], true);&lt;BR /&gt;if(isempty(boundaries)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 1"};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var intersectBoundaries = Intersects(boundaries, $feature);&lt;BR /&gt;if(isempty(intersectBoundaries)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 2"};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var structureBoundary = First(intersectBoundaries);&lt;BR /&gt;if(isempty(structureBoundary)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 3"};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var AllDevices = FeatureSetByName($datastore, "FLUVIUS_109_DESIGN2.UTARC.ElectricDevice", ["assetgroup", "globalid"], true);&lt;BR /&gt;if(isempty(AllDevices)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 4"};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var XYDevice = Filter(AllDevices, filterDevice)&lt;BR /&gt;if(isempty(XYDevice)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 5"};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var intersectDevice = Intersects(XYDevice, structureBoundary);&lt;BR /&gt;if(isempty(intersectBoundaries)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 6"};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var DeviceGeo = First(intersectDevice)&lt;BR /&gt;if(isempty(DeviceGeo)){&lt;BR /&gt;return;&lt;BR /&gt;//{"errorMessage": "Error 7"};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;return {&lt;BR /&gt;"edit":&lt;BR /&gt;[&lt;BR /&gt;{"className": update_class,&lt;BR /&gt;"updates":[{"globalid": DeviceGeo.globalid,&lt;BR /&gt;"FROMTERMINALID": 13,&lt;BR /&gt;"associationType":"connected"}]}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have tried:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-"fromTerminal": "13"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterStampfl_1-1659553935836.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47716iFCBAC60376D3754D/image-size/large?v=v2&amp;amp;px=999" role="button" title="PeterStampfl_1-1659553935836.png" alt="PeterStampfl_1-1659553935836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- "fromTerminal": 13&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterStampfl_2-1659553960114.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47717i95CB5AEEF3524729/image-size/large?v=v2&amp;amp;px=999" role="button" title="PeterStampfl_2-1659553960114.png" alt="PeterStampfl_2-1659553960114.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- "FROMTERMINALID": 13&lt;/P&gt;&lt;P&gt;I get a association without error but, I have topology errors and the terminal is set FromTerminalID 1 ToTerminalID 1&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterStampfl_3-1659554294320.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47719i97E74F0E5719AF15/image-size/large?v=v2&amp;amp;px=999" role="button" title="PeterStampfl_3-1659554294320.png" alt="PeterStampfl_3-1659554294320.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The association rule looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterStampfl_4-1659554326519.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47720i5B230F23F6CAA9D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="PeterStampfl_4-1659554326519.png" alt="PeterStampfl_4-1659554326519.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 19:24:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1199115#M503</guid>
      <dc:creator>PeterStampfl</dc:creator>
      <dc:date>2022-08-03T19:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the right terminal when creating connectivity associations with attribute rules</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1199233#M504</link>
      <description>&lt;P&gt;The terminal id needs to be set on the line class, not the device.&amp;nbsp; If you are trying to create an association, you need to use &lt;SPAN&gt;^UN_Association&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm#ESRI_SECTION1_98D8C1A03B0D4BAB810DCC76DBA88F2C" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm#ESRI_SECTION1_98D8C1A03B0D4BAB810DCC76DBA88F2C&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 23:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1199233#M504</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2022-08-03T23:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the right terminal when creating connectivity associations with attribute rules</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1199238#M505</link>
      <description>&lt;P&gt;Think of the dictionary you are authoring as creating an association from $feature to whatever feature you specified in the update_class. Specifying FROMTERMINAL means here you are trying to create an association from the $feature so that terminal should exist on that feature.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the terminal you are connecting to is at the device then use ToTerminal. and you can safely use the string name&amp;nbsp;&lt;/P&gt;&lt;P&gt;A blog detailing this can be found here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/utility-network/electric-gas/advanced-attribute-rules-creating-utility-network-associations-with-attribute-rules/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/utility-network/electric-gas/advanced-attribute-rules-creating-utility-network-associations-with-attribute-rules/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As Mike said, you can also use&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;^UN_Association if you want more control. (create associations between two assets other than $feature.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope that helps&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 23:57:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1199238#M505</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2022-08-03T23:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the right terminal when creating connectivity associations with attribute rules</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1200390#M507</link>
      <description>&lt;P&gt;It worked with that retun statement:&lt;BR /&gt;&lt;BR /&gt;return {&lt;BR /&gt;"edit":&lt;BR /&gt;[&lt;BR /&gt;{"className": UpdateClass,&lt;BR /&gt;"updates":[{&lt;BR /&gt;"globalid": DeviceGeo.globalid,&lt;BR /&gt;"fromTerminal": fromTerm,&lt;BR /&gt;"toTerminal": toTerm,&lt;BR /&gt;"associationType":"connected"}]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 14:30:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/how-to-set-the-right-terminal-when-creating/m-p/1200390#M507</guid>
      <dc:creator>PeterStampfl</dc:creator>
      <dc:date>2022-08-08T14:30:10Z</dc:date>
    </item>
  </channel>
</rss>

