All,
I am trying to implement an attribute rule which updates a feature class field when the related 1:M table gets updated. The process right now is, the field in the related table changes, we get the keys, roll up the data into a string and then get the related record in the feature class and write the text value.
Issue is, a) the for loop is in error and if I comment it our and put a dummy value in my text variable, it doesn't actually write anything.
Any help would be appreciated.- thank you
var tbl = FeatureSetByName($datastore,"DB.LAND.CustomerAddress");
var fc = FeatureSetByName($datastore,"DB.LAND.AddressLocation");
var locationeguidKey = $feature["locationeguid"];
var CustomerSql = "locationeguidKey = '" + locationeguidKey + "'";
var premiseSQL = "GlobalID = '" + locationeguidKey + "'";
var CustomerAddressResult = Filter(tbl, CustomerSql);
var txt = null;
var address;
for (var address in nonCustomerAddressResult){
txt = Text(address.building_number, ',');
}
return {
if (Count(txt) > 0){
txt = Left(txt, Count(txt) - 1);
premiseResult = Filter(fc, premiseSQL)
// premiseKey.labeltext = txt;
}
"result" : txt,
"edit":[{
"className": "premiseResult",
"updates" : [{
"labeltext": txt
}]
}]
}