Focal Point
[SOLVED] WF Maintain -- Can anyone make TAKES work with IWCTrigger?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1997082036

April 19, 2013, 11:30 AM
John_Edwards
[SOLVED] WF Maintain -- Can anyone make TAKES work with IWCTrigger?
Just curious if anyone can make the Takes paramters work with and IWCTrigger call in Maintain (I'm on 7.7.03 right now). I've given up and I'm just using global variables because, frankly, it's not worth the time to get it to play nice. I'm just curious to know if anyone else is running into the same barrier. It seems like it should be simple and there's a pretty clear example in the manual that doesn't seem to do what it says it does.

J.

This message has been edited. Last edited by: <Kathryn Henning>,



April 19, 2013, 12:44 PM
Alan B
Hi John

My understanding is that TAKES only works within the Maintain, From the docs I see:
quote:
If the function is the Top function or is being used as an event handler, it cannot take parameters.


IWCTrigger is an event handler. I would use GetHTMLField if I needed something not already passed across.

Did you see something different?


Alan.
WF 7.705/8.007
April 19, 2013, 01:17 PM
John_Edwards
I read that differently. I read that to mean the case being called can't be the trigger handler itself. This is a case in the main body of source code being called from an IWCTrigger function in a javascript trigger. The IWCTrigger spec even shows how to put additional parameters onto it.

J.



April 19, 2013, 01:23 PM
Alan B
Ahhhh. We learn something new everyday John.

function OnButton1_Click ( )  {
var param = "this is my life";
alert(param);
IWCTrigger("WhooHoo",param);
}


In the Maintain:
.
Case WhooHoo
calledParameter/a0 = Form1.triggervalue;
.

Takes will stop the case working from IWCTrigger.
'mazing.


Alan.
WF 7.705/8.007