Hi there,
I have two global variables and a script.
What I am trying to do is the following:
1) Pass the first global to the script
var result = showMessage(runtime.globalVars.speechFinal);
2) Set the second global with the result
runtime.globalVars.finalOutput = result;
The script has the following and delivers the expected output in the console:
function showMessage(interimresult)
{
var string = interimresult;
var cleanSet = new Set(string.split(' '));
var clean = Array.from(cleanSet).join(' ')
console.log(clean);
clean.toString();
}
However the second step is failing.
When trying to do this I get the following error:
Cannot read properties of undefined (reading 'toString')
Any help or pointers would be greatly appriciated!
Best wishes
/Thomas