Hi community!
I am trying to use ArcGIS Field Maps for viewing inventory of different groups of plants. I have set up an expression in Arcade in Field Maps, and the expression aims to calculate the current number of plants in an area, taking into account changes in its inventory. When someone adds or pulls plants, they will enter the number added or pulled into a field titled "Change" in the form of a positive or negative integer. When someone creates a new group of plants, they will put the original number of plants that they started with.
I am extremely new to Arcade so am just figuring this all out. I tested this expression and received no error messages, but when I try to create features in Field Maps, the whole form freaks out and freezes and the calculated value shows random numbers.
Expression:
if (IsEmpty($feature["Current_Number"])) {
return $feature["Original_number"];
} else {
return Sum ($feature["Current_Number"], $feature.Change);
}
If anyone could identify a possible error here, or can think of a better approach, I'd appreciate it so much. Thank you!