I am trying to pass a delimited string to cloudscript, and want to split that string into an array within the cloudscript.
Seems like it ought to be pretty simple and straight forward, but I am having some issues.
Below is the relevant code from my cloudscript...
When this executes, I receive the below error in the playstream...
Any idea what I am doing wrong?
"Error": { "Error": "JavascriptException", "Message": "JavascriptException", "StackTrace": "TypeError: Cannot read property 'split' of undefined\n at handlers.AddInventory (1F06-.CloudScript.js:324:26)" }
var Qtys = []; var Qty = ""; if (args && args.hasOwnProperty("QTYs")) Qty = args.QTYs; log.info("QTY" + Qty); Qtys = Qty.split(";", -1);