Expressions in ArcGIS Arcade have the same function as Indirect Expressions in excel

422
1
10-21-2021 09:03 PM
Labels (2)
bhariadi
New Contributor III

Hi All,

What expressions in ArcGIS Arcade have the same function as Indirect Expressions in excel?

Please see the illustration below:

Capture143.JPG

 

0 Kudos
1 Reply
JohannesLindner
MVP Frequent Contributor
// SortField: Field to sort the feature set by, e.g. ObjectID

var sort_val = $feature.SortField
var fs = FeatureSetByName($datastore,"YourFeatureset", ["SortField", "ValueField"])
fs = Filter(fs, "SortField < @sort_val")
if(Count(fs) == 0) {
    return $feature.ValueField
}
return First(OrderBy(fs, "SortField DESC")).ValueField

Have a great day!
Johannes
0 Kudos