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?
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
- Josh Carlson
Kendall County GIS