Focal Point
parameter passing

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

March 10, 2008, 04:08 PM
Noel
parameter passing
Is it possible to pass parameters from one html file to another html or fex?
Here is the flow on how the process works.
HTML1 ------> Fex1------->HTML2------>Fex2
Company Company Company Company
Warehouse Warehouse Warehouse Warehouse
FromDate FromDate FromDAte FromDate
Todate Todate Todate Todate


Thanks again for the help!


WebFocus 762 AS400 / DB2
March 10, 2008, 04:20 PM
Trav
The short answer is yes. Basically what you have to keep in mind is that HTML layouts can access amper variables via JavaScript methods. The syntax in JS to access a variable &CAR would be something like:
var car = "!IBI.AMP.CAR;";


You could then use that "car" JS variable to do whatever you want. One thing that we have found though is that your HTML layout needs to be opened via a fex -- you can use the "-HTMLFORM" command to do this.

That should get you started -- I've got a more detailed example, so let me know if you can't figure it out from there.



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
March 10, 2008, 04:33 PM
Noel
Hi Trav,

Thanks for the reply.

Now I can access my variable at HTML2 but now my problem is how am i going to pass it to my fex2.

Thanks again.


WebFocus 762 AS400 / DB2
March 10, 2008, 04:43 PM
Trav
At that point, it's just a plain ole parameter pass to a fex -- just like how you passed it to fex1 from html1. You'll have to have JS populate some control that you're using for a parameter -- but it doesn't matter whether it's a visible parameter or hidden...

Basically set up HTML2 so it works independently, and then simply set the value of the right control via JS in the onload of the window.



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
March 11, 2008, 04:22 AM
GamP
Provided you call the htmlp age from within your fex using the -HTMLFORM statement, you can use the !IBI.AMP.name; technique anywhere in your html page. The example that Trav gave can also be used to populate form-variables, or to just present plain text or whatever you want to do with the variable.
Using it in a < input > tag to populate a form-variable will automatically make the variable available in the fex called from the form action.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988