[progress Communities] [progress Openedge Abl] Forum Post: Re: [4.2] - Including A Function...

Status
Not open for further replies.
M

mpiscoso@gmail.com

Guest
Given Thierry's example, i think i know where your problem lies iramk. You want your reusable function to be cast to a variable but it is being treated as the return statement of the whole trigger (sorry I didnt notice earlier). To fix this you'll need an encapsulating function, ex. //hosted file(s) or string token(s) here function doThings() { var x = test("hello"), y = computeSquare(5); return x + " " + String(y); } doThings(); By encapsulating in a function you'll be able to create local variables that gets their values from reusable functions from any source, be it hosted file, string token, or in-trigger fuctions. The main problem is the unencapsulated script was being treted as the return and the above should solve that. Hope this helps you further. Cheers.

Continue reading...
 
Status
Not open for further replies.
Top