Hi all,
I'm hoping you can help me out with this Arcade expression. I have an inspection form in ArcGIS FieldMaps that needs to calculate whether or not something is "passing" based on multiple conditions.
I'm having trouble with the nested IF statements failing to calculate in FieldMaps. I need to write an expression to say:
Slope 1 is passing IF slope percentage is not null and less than or equal to 8.3, BUT if the style is Blended Transition or Cut Through, then it is only passing if the slope percentage is less than or equal to 5.
My expression so far is:
if (($feature.ramp_style =='Blended_Transition'||$feature.ramp_style == 'Cut_Through')&&($feature.Run1_Slope_PC <=5) && $feature.Run_Slope1_PC!=null) {
return "Pass"
} else if (($feature.ramp_style!='Blended_Transition' && $feature.ramp_style != 'Cut_Through')&&($feature.Run_Slope1_PC>0 && $feature.Run_Slope1_PC<=8.3 && $feature.Run_Slope1_PC!=null)) {
return "Pass"
} else {
return "Fail"
}The only error message I get is "Failed to Calculate" and "Exploded Map Package" in the FieldMaps troubleshooting logs.
I don't have much experience with nested if-else blocks so maybe I have my grammar wrong?
Thanks for all your help,
Caitlin