<?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 Arcade: Script to retrieve the greater diameter between connecting pipes in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-script-to-retrieve-the-greater-diameter/m-p/1131561#M43664</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I wonder if the community can help me with some Arcade scripting for an attribute rule.&lt;/P&gt;&lt;P&gt;I have a network of pipes that are connected to nodes. Most of pipes connecting have the same pipe diameter, but there instances where two pipes connecting to a node will have different diameter(larger pipe connecting to a smaller pipe)&lt;/P&gt;&lt;P&gt;I have a column in the node table called "Maximum Pipe Diameter" and I would like to populate the column with the diameter values of the connecting pipes. As stated above, the majority of the connecting pipes will have the same diameter, but there are a number of nodes where the connecting pipes have different diameters.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can an attribute rule be made to populate the Maximum Pipe Diameter with the larger diameter value of the connecting pipe? I've been looking at Github and wasn't able to find suitable script to perform this task.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!&lt;BR /&gt;&lt;BR /&gt;Justin&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jan 2022 12:59:56 GMT</pubDate>
    <dc:creator>JustinBernard</dc:creator>
    <dc:date>2022-01-07T12:59:56Z</dc:date>
    <item>
      <title>Arcade: Script to retrieve the greater diameter between connecting pipes</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-script-to-retrieve-the-greater-diameter/m-p/1131561#M43664</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I wonder if the community can help me with some Arcade scripting for an attribute rule.&lt;/P&gt;&lt;P&gt;I have a network of pipes that are connected to nodes. Most of pipes connecting have the same pipe diameter, but there instances where two pipes connecting to a node will have different diameter(larger pipe connecting to a smaller pipe)&lt;/P&gt;&lt;P&gt;I have a column in the node table called "Maximum Pipe Diameter" and I would like to populate the column with the diameter values of the connecting pipes. As stated above, the majority of the connecting pipes will have the same diameter, but there are a number of nodes where the connecting pipes have different diameters.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can an attribute rule be made to populate the Maximum Pipe Diameter with the larger diameter value of the connecting pipe? I've been looking at Github and wasn't able to find suitable script to perform this task.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!&lt;BR /&gt;&lt;BR /&gt;Justin&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 12:59:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-script-to-retrieve-the-greater-diameter/m-p/1131561#M43664</guid>
      <dc:creator>JustinBernard</dc:creator>
      <dc:date>2022-01-07T12:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Script to retrieve the greater diameter between connecting pipes</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-script-to-retrieve-the-greater-diameter/m-p/1131570#M43665</link>
      <description>&lt;P&gt;I don't have a layer to test this against, but I assume this shouldn't be too hard. Are the pipes all coming from the same layer? How about something like this?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var n = $feature

var pipes = FeatureSetByPortalItem(
    Portal('your-url'),
    'itemid',
    0, // or whatever layer index
    ['pipe_diameter'],
    true
)

var xs_pipes = Intersects(pipes, n)

var diam = Max(xs_pipes, 'pipe_diameter')

return diam&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 13:53:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-script-to-retrieve-the-greater-diameter/m-p/1131570#M43665</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-01-07T13:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Script to retrieve the greater diameter between connecting pipes</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-script-to-retrieve-the-greater-diameter/m-p/1131573#M43666</link>
      <description>&lt;P&gt;Hi Josh,&lt;BR /&gt;Yeah, the pipes all reside on one layer. I'll give&amp;nbsp; your code a shot.&amp;nbsp;&lt;BR /&gt;Thanks so much!&lt;BR /&gt;Justin&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 13:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-script-to-retrieve-the-greater-diameter/m-p/1131573#M43666</guid>
      <dc:creator>JustinBernard1886</dc:creator>
      <dc:date>2022-01-07T13:59:26Z</dc:date>
    </item>
  </channel>
</rss>

