AnsweredAssumed Answered

Error using Insert triggering event Add Attribute Rule

Question asked by adlukas1 on Oct 16, 2020
Latest reply on Oct 20, 2020 by xander_bakker

I am helping our city Fire Department to conduct fire hydrant inspections. One of the inspection steps is to take several readings (static pressure, residual pressure and pilot pressure) from the hydrant to determine flow gallons per minute (GMP). Typically, they would take these readings and have to put them into a third-party program that then does the calculations to in the background to get GPM.


I have an Arcade script that will allow the GPM to be determined in the field once the required numbers are input in the appropriate fields. I have run script in Pro with no problems. I wanted to add an attribute rule with a triggering event of 'Update' and  'Insert' so when they either go to an existing hydrant or add a new one and conduct a flow test the GPM will be calculated on the fly.  It runs as expected on existing hydrants. However, when I try to add a new hydrant I am receiving an error. Any guidance would be greatly appreciated! Please see error message, script and set up of geoprocessing tool below. 






var P = $feature.pilotpress
var S = $feature.staticpress
var R = $feature.respress
var Q = 167.0625 * Sqrt(P);

var RF = Q * Pow(((S - 20) / (S - R)), 0.54);
return RF