Hi,
So what I am doing is trying to update the Inspection Status (INSP_STATUS) of a feature, based on an inspection records that is getting populated in a separate table....both in the same database.
So far this is what I have setup as a "Validation" rule on the table the inspections get saved in. So if the newly created inspection meets the criteria to be marked as "Out of Service" I need to update the INSP_STATUS field of the feature to "OOS". The inspection/feature have a common field of FACILITYID.
When I 'verify' the code I get the green check, but when I try to save the attribute rule, I get a red mark and it tells me I need to use a GlobalID. Is there a way to do this without using the GlobalID??
if (($feature.OUT_OF_SERVICE != null) && ($feature.DATEWORK == null))
{
//update INSP_STATUS in the hydrant layer to OOS
return
{
'edit': [{
'classname' : 'WAT_Hydrant',
'updates' : [{
'FACILITYID' : $feature.FACILITYID,
'attributes' : {
'INSP_STATUS' : 'OOS'
}
}]
}]
}
}