Focal Point
[SOLVED]passing a parameter to a HTML form

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

November 30, 2015, 04:25 PM
Jay Potter
[SOLVED]passing a parameter to a HTML form
Before AppStudio I was able to pass a parameter by using something like !IBI.AMP.PARAMETER and put it in the selected value area. But it seems i can't do it that way anymore. What is the proper way sing version 8.0.9 to pass a parameter to an HTML form.

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
December 01, 2015, 07:45 AM
MartinY
Hi Jay,

1- You need to create a fex that will HOLD in XML the value of your parameter.
2- Your HTML will then need an hidden (or not hidden, depend on your need) field that will read the previous HOLD file having the parameter value. Such as the same as if you are creating a list box or drop down list where you read a XML file.

Such a pain, isn't it ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
December 01, 2015, 07:56 AM
Jay Potter
Thanks! I did think of that , but I couldn't believe that is what would have to be done.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
December 01, 2015, 11:09 AM
Barry Solomon
Hi Jay

You should still be able to use a !IBI.AMP but its not the preferred way. You can have a hidden input control and bind it to an external procedure. The external proc can get the data and pass as an XML formatted report. Hope this makes sense to you.


WebFOCUS 8
Windows, All Outputs
December 02, 2015, 07:54 AM
GavinL
OR, you could just turn all your HTML's into FEX's with -HTMLFORM BEGIN/END wrapped in it, then you can pass all params like any FEX. Easier for me to say that, because I don't use AS to write my HTML, but I know some of you do.. Sorry about that.. :P



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
December 02, 2015, 07:55 AM
MartinY
It may still work as Barry said, but I suggest to not use it anymore. At least not directly in HTML.

Let say that you have a .fex which is defining !IBI.AMP variables then calling an HTML page who is using those !IBI.AMP var.

Then say that you are using the "Save Parameters" option button provided by IBI. That save button was previously (WF7 and prior) saving the main called file which is, in this case, the .fex who defined !IBI.AMP var.

Now in WF8, the save button is saving the HTML file and not anymore the .fex.

So your !IBI.AMP var are not defined when the user will execute its save parameters.

Example of inserted row in the save parameter file in WF7 and prior :
<INPUT type="hidden" name="IBIMR_fex"  value="app/a_report.fex"/>


Now with WF8
<INPUT type="hidden" name="IBIMR_fex"  value="app/a_report.hml"/>


I'm in the situation now where I have to change all my HTML pages to not use !IBI.AMP because of the save button option that is now saving the .htm instead of the .fex


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
December 02, 2015, 10:58 AM
CoolGuy
I still use !IBI.AMP. syntax, but do so within a .fex coupled with the -HTMLFORM tag combo. Works just fine. I've never tried to use those in conjunction with the GUI tool generated code. Sounds like that was a good choice.

Good luck!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
December 13, 2015, 05:13 AM
Jay Potter
I ended up building a fex that stores the value in a hold file. Which is a pain.

Thanks


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster