I have a feature service in ArcGIS Online with a polygon parcel layer and an inspection table. The parcel is the parent layer and it is related to a water service inspection. The end goal I am looking to have is that once an in inspection form is completed, it updates a field (Status) in the parcel layer that I can use to symbolize whether the inspection is complete for that parcel.
I have seem varying posts about whether this is possible or not in ArcGIS Online Map Viewer. It seems like a simple task but I haven't been able to get it to work using Arcade in Web Map Viewer Forms
In the Forms, I have calculated the below expression for the "status" field in the Parcel layer I want updated. "InspectionStatus" is the field in the inspection form that field workers update and that I want recorded in the parcel layer :
var relate = FeatureSetByRelationshipName($feature, "PrivateWaterServiceInventory" );
var inspection = First(relate);
if(inspection.InspectionStatus != null){
return inspection.InspectionStatus;
} else {
return null;
}
I am able to get the above script to work, but not automatically. I have to go into the parcel layer in Field Maps and click "edit" to start the arcade expression and fill in the status field.
Any help would be appreciated! Thanks.