I currently have a little script running that reads a value and if it contains “Lansing” or “Midland” outputs “Lansing”, else it outputs “”. great.
var result = “ARG1”;
if (result.includes(“Lansing”) || result.includes(“Midland”))
{
result = “Lansing”;
}
else
{
result = “”;
}
result = result;
It runs perfect on the assembly editor.
When i run it in the automation, I get the error
javax.script.ScriptException: TypeError: result.includes is not a function in at line number 2.
not sure the issue since it works in the assembly editor