So I've tried two things and I think I'm doing it right, but I'm not sure so I'll post the code bit. First I'm trying to buffer the gravity mains, which is the layer that has the expression applied to it's pop up.
var phase1 = FeatureSetById($map, 'Phase 1 -- 2025_c1dde3')
var buffer_ph1 = Buffer($feature, 20, 'feet')
var phase1_capDepth = Intersects(phase1, buffer_ph1)
var phase1_details = ''
for(var row in phase1_capDepth) {
phase1_details = phase1_details + row.capdepth
}
return phase1_details
I also tried it the other way around to buffer the phase 1 line that is crossing the gravity main, but neither seems to work. I've also tired a few different buffer distances.
var phase1 = FeatureSetById($map, 'Phase 1 -- 2025_c1dde3')
var buffer_ph1 = Buffer(phase1, 20, 'feet')
var phase1_capDepth = Intersects(buffer_ph1, $feature)
var phase1_details = ''
for(var row in phase1_capDepth) {
phase1_details = phase1_details + row.capdepth
}
return phase1_details
Hopefully I didn't mess up my variables doing this 🤔
I made a test file and it seems to be working in that, so I might just try to start over again.
I do have one more question though. Is it a problem if you have multiple expressions on one layer that use Intersect to pull data from many different layers? I suppose that might be my problem.