Is there an issue using constants / objects in the Data Map? I have a simple script that works the first time, but if I open it again or step through the data model, I get a “constant redeclaration” error. The “LANG” field has the two-character code used as keys for the object.
const objLang =
{
"SP": "Spanish",
"EN": "English",
"RU": "Russian"
}
var result = "English";
result = objLang[record.fields.LANG];
result;