Hello all,
I'm attempting to automatically compile an array of domain codes for comparison when deciding how to visualize a layer.
So this is what I've got so far:
var codearray = Array(1)
var domain = Domain($feature, "Status")
var index = 0
var codedValues = domain.codedValues[index].code
for(var att in codedValues){
Insert(codearray, 0, codedValues)
index + 1
}
return codearray
Results:
array(4)
0: null
1: "Run"
2: "Run"
3: "Run"
Input Data (results of Domain function)
dictionary
codedValues: array(2)
0: dictionary
code: "Run"
name: "Run"
1: dictionary
code: "Standby"
name: "Standby"
dataType: "esriFieldTypeString"
name: "HydrantLoc_111319_Status_f1dd7c78-d63c-4b23-8d0d-a5f5c916c584"
type: "codedValue"
The Results I'm looking for:
array(2)
0: "Run"
1: "Standby"
Then to take this a step further I'm looking to do this for multiple fields and then combine them into another array that contains every combination of value from each array. But maybe that's a problem for a different post.
Thanks In Advance Yall!