Hello,
We were very happy to see that Arcade expressions are supported in Field Maps and were hoping to use it to generate unique IDs in the field that can be referenced on reports, project documents. We developed an Arcade expression that does this and it works when loaded into the Beta Map viewer. However when opened in Field Maps we get an error code 15, Evaluation_error_code::unknown_function Line :20. I got the expression to work in Field Maps by removing many of the functions which unfortunately make it no longer meet our needs. Does anyone know if there is only a subset of the Arcade library that will work in Field Maps?
Thanks in advance for any help!
Below is the expression that has been developed:
var choices = {};
choices['1'] = 'BLD';
choices['2'] = 'STR';
choices['3'] = 'PAD';
choices['4'] = 'PIT';
choices['99'] = 'OTH';
function formatMulti(inField, d) {
var values = Split(inField, ',');
var labels = [];
for (var i in values){
labels[i] = d[values[i]];
}
var outText = Concatenate(labels, TextFormatting.NewLine);
return outText;
}
var park = IIf(IsEmpty($feature.SiteID), "UNK", Right(Left($feature.SiteID, 6), 3));
var yr = Text($feature.CreationDate, 'YY');
var tpe = formatMulti($feature.Type, choices);
var unique_val = $feature.Creator + $feature.CreationDate;
var hashed = Round(Sqrt(Hash(unique_val)), 0);
var new_id = park + "-" + yr + "-" + tpe+hashed;
return new_id