I have features with calculated expressions (via field maps designer) that take values from nearby points and produce a shared final score. The issue I am facing is that when an additional point is created or one point is edited, all the other points need to be selected individually to be updated. In the picture below, there are four black points for each leg of an intersection. After each point is created and their forms are completed, the user has to go back and click each point individually to reupdate each point once again. Since any change to one point affects all 4.
In the picture above, the Freight Access Total Score does not change when I edit the values of the scoring fields. While the Freight Access Leg Direction Score updates instantly as I made updates (since it doesn't look for other features). To get the Freight Access Total Score to update for all the legs, I need to click the blue update button, then open the editor for each leg point and update every one of them manually.
I am wondering if there is a way to add to the arcade code to automatically update instead. Or any other workarounds that would solve this problem. I have my code for the Freight Access Total Score field below.
// get the current project and intersection name
var currentProj = $feature.Project;
var currentIntx = $feature.Intersection;
// Filter through the other points that have the same project and intersection name
var matchingProj = Filter($featureSet, "Project = @currentProj AND Intersection = @currentIntx");
// set initial total denmoniator of scoring ratio to 0
var totalSumDenominator = 0;
// set highest possible score values of different fields
var fieldsAndScores = {
Freight_VerticalClearance: 2,
Freight_CornerTurningRadii: 1,
Freight_TruckTurningMovement: 2,
Freight_OnStreetParking: 1,
Freight_DesignatedFreightRout: 2
};
var listOID = [];
var index = 0;
var attributesList = []; // Initialize an empty array for dictionaries
// loop through each direction within the filter to get the total denominator
// collect list of OIDs within the loop
for (var feat in matchingProj){
listOID[index] = feat.OBJECTID;
index += 1; // Increment the index
if (IsNan(feat.LegDirection)){
continue
}
var sumDenominator = 0;
for (var field in fieldsAndScores) {
if (!IsEmpty(feat[field])) {
sumDenominator += fieldsAndScores[field];
}
}
totalSumDenominator += sumDenominator;
}
// Debugging: List out OIDs in the list
Console("List of OIDs: " + listOID);
// Add all values of the IntPedADAScore for all features in the filter
var totalIntFreightScore = Sum(matchingProj, "Freight_AcessLegDirScore");
if (totalSumDenominator > 0) {
var FinalScore = Round(((totalIntFreightScore / totalSumDenominator) * 100), 2);
return FinalScore;
} else {
return 0; // Default value if the denominator is zero
}
Solved! Go to Solution.
No, editing a feature doesn't automatically update another feature.
You can do this post e.g.:
For example, in the edit form, use Arcade to update a hidden field to 'unprocessed' and then schedule and ArcGIS Notebook to update the surrounding features and then update the field to 'processed'. Using python and runs every 15min.
Bulk editing features (edit multiple) may seem like an option but doesn't support forms at this time.
No, editing a feature doesn't automatically update another feature.
You can do this post e.g.:
For example, in the edit form, use Arcade to update a hidden field to 'unprocessed' and then schedule and ArcGIS Notebook to update the surrounding features and then update the field to 'processed'. Using python and runs every 15min.
Bulk editing features (edit multiple) may seem like an option but doesn't support forms at this time.
Thank you! Good to know!