Use Case:
Have central flow that returns a structure of 2 dates: paymentDate and payThroughDate;
I tried two techniques that I debugged in VisualStudio and they work there. So, pasted them in to an Assign script var.
Abridged Version
subFlow:
function calcDates(frequency)
{
logicToCalcDates;
var pDates
pDates = {"paymentDate":paymentDate,"payThroughDate":payThroughDate} //JSON object
/*
or,
pDates = function(){} //jscript object
pDates.paymentDate = paymentDate
pDates.payThroughDate = payThroughDate
*/
}
the calling script (same flow)
Assign node
pDates = eval(calcDates("TUESDAY"))
paymentDate = pDates.paymentDate
payThroughDate = pDates.payThroughDate
At this point, both the above vars are "undefined"...... Hmmm...