Title: RE: runEvent() doesn't return anything
Thread: runEvent() doesn't return anything
Forum: Need Help?
Conference: ColdBox
User: pwp69 sanaullah73, Thank you for the reply.
In the first 'ehFirst' that calls the
other 'ehSecond' I am using the requestCollection and in fact it works as you
describe... if I set the returning value to an rc.var in ehSecond.
... if I
do the following in ehSecond.getUserData
var arrUserData = ArrayNew(1);
...
code to create user data array...
rc.arrUserDate = arrUserData;
</cfscript>
</cffunction>
I can use rc.arrUserDate in the ehFirst. All well
in good!
On the other hand if I try to do this from ehFirst.dspUsers:
rc.arrUserData = runEvent("ehSecond.getUserData");
where in
ehSecond.getUserData I have something like:
var arrUserData = ArrayNew(1);
... code to create user data array...
return arrUserDate;
</cfscript>
</cffunction>
I don't get the value returned.
Can you give me an example
where I would want to return a value?
Thx again,