AnsweredAssumed Answered

How to use the geometry of a related record in Arcade

Question asked by 2123590 on Apr 8, 2020
Latest reply on Apr 14, 2020 by xander_bakker

Good morning all

 

I am trying to calculate the distance between points in two different feature layers using Arcade. 

Using FeatureSetById I can pull the data for the related feature layer, but how do I use the geometry of the related feature in the arcade Distance function?

 

Please help, I cannot find any documentation on how to do this.

 

Thanks

Gavin

 

//First read out the unique id of current feature
var A1 = $feature.holenumber
//Access the second feature
var A2 = FeatureSetById($map, /* Designed_drilling */ "Designed_drilling_3788", ['holenumber'], true)

//create sql expression
var A3 = "holenumber = '" + A1 + "'"

// filter the second feature using the sql expression
var A4 = Filter(A2, A3)


return A4


//Distance($feature, $A4, 'meters')

 

Outcomes