I'm attempting to us $originalFeature as a means to bail early on my more costly form field calculations. The error feels like a bug rather than a limitation, but perhaps I'm missing something.
Everything executes fine in the FM Arcade Editor, but FM throws the error "Unexpected Null Value" on points out the line that contains a reference to $originalFeature (line 4). This is present on both iOS & Android.
//expr_service_date
console('Calculating Service Date based on Service Number...');
var oServiceNumber = $originalFeature["service_number"];
var cServiceNumber = $feature["service_number"];
var self = $feature["service_date"];
//Test Values
// var oServiceNumber = "'02081600.1658 (20220811)";
// var cServiceNumber = "'02081600.1659 (20220812)";
// Exit Early - return self
if (oServiceNumber == cServiceNumber) {
// if the service number didn't change return current value
console('>>> No change detected, returning self');
console(' >>> ' + self);
return self;
};
// Do the costly things here only if a change is detected
@Anonymous User Any thought?
Thanks