Hi,
So I am trying to update one value in one field based on a selected value in another field using domains and attribute rules. So far I am struggling to figure out how to set up the attribute rule where the user selects one value from one domain which in turn automatically updates a value in another field based on matching coded values. Here is what I have so far:
var fc = $feature
var POC_fieldname = 'PointOfContact'
var Contact_fieldname = 'ContactInformation'
var PLdom_values = Domain(fc, POC_fieldname)
var PCdom_values = Domain(fc, Contact_fieldname)
var PL_codedVals = PLdom_values.codedValues
var PC_codedVals = PCdom_values.codedValues
for (var PL in PL_codedVals){
for (var PC in PC_codedVals){
if (PL == PC){
return PC
}
}
}I haven't done anything like this in arcade, but I do it all the time in python. I am struggling a bit with this so any help on this would be greatly appreciated.
Thanks.