Focal Point
[SOLVED] HTML form not passing parameter, auto-prompt still asking for a value

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

September 24, 2013, 11:27 AM
J.Hines
[SOLVED] HTML form not passing parameter, auto-prompt still asking for a value
I seem to have this problem almost every time I try to add a new variable to a launch page. We're on 7.7.03, no hotfixes unfortunately.

It looks like everything is fine codewise, but I've often found that the HTML code doesn't get cleaned up properly when using the HTML composer, so I'm not sure if that's what's going on, or if I missed a step somewhere.

In my fex, I have a defaulted variable that should be supplied from the launch page (&LookBack):
-DEFAULT &LookBack = '30D'
-SET &BackInTime = IF &LookBack EQ '1WK' THEN 7 ELSE
-	   			   IF &LookBack EQ '2WK' THEN 14 ELSE
-	   			   IF &LookBack EQ '3WK' THEN 21 ELSE
-	   			   IF &LookBack EQ '30D' THEN 30 ELSE
-	   			   IF &LookBack EQ '60D' THEN 60 ELSE 30;


So I coded this, went to the launch page, said Refresh Parameters, and had it create a new combobox for the LookBack parameter. I check the parameters tab, and all looks good, the combobox is connected to the parameter.

But when I run the report in the frame on the launch page, I still get the autoprompt for the value. The report runs if I let it keep the default, but it should be taking the value from the the combobox.

Again, this has happened time and time again, and it always seems to be some kind of glitch where if I redo things enough times, it works, and I don't know why.

Does anybody have a reliable way to do this, or know of what I can look into, even in the HTML code, to get the parameter actually passed to the form?

This message has been edited. Last edited by: J.Hines,



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
September 24, 2013, 12:15 PM
Francis Mariani
I don't have a clue what "Refresh Unresolved" does in the Parameters tab (I didn't find "Refresh Parameters").

I *think* you have to do the following to connect the report parameter to the control:

- Right-click the Run button and select "Hyperlink properties..."
- Click on ... in the Source column of the Hyperlink Properties window
- Then click OK.

This should bring in the newly added report parameter(s).

Behind the scenes, in the 'xml' code embedded in the HTML file (the stuff THEY don't want you to look at), a "requestid" is assigned to each fex that's run from the page (you could launch more than one report). Adding a new parameter from the Parameters tab ("Add parameter") doesn't connect it to the requestid. Each parameter has a "variable" entry in the xml and each variable has a list of "requestid"s attached to it. In the past, I've CAREFULLYplayed with this xml by adding the required requestid xml - not recommended, and I certainly didn't tell you about this.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 24, 2013, 01:51 PM
J.Hines
Thanks Francis. I did do a refresh to bring in the parameter and have the wizard create a control for it (which in my mind should be enough), but I think this among other things in the HTML Composer is just pretty buggy in our non-hotfixed version of 7703.

And no worries about your other information, I've already done plenty with the behind-the-scenes XML before to get it to do what I want, so this wouldn't be anything new (except that your info may help me fix it), I just had hoped I wouldn't have to resort to going back there to resolve this.

I'll see what I can find and post an update.



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
September 24, 2013, 01:58 PM
J.Hines
Once again Francis, your experience as hackmaster is invaluable.

quote:
- Right-click the Run button and select "Hyperlink properties..."
- Click on ... in the Source column of the Hyperlink Properties window
- Then click OK.


You get the Refresh Parameters option if you have a frame referencing an existing procedure, which is what I did, and which is what created the controls and supposedly hooked up the control to the parameter. But I guess you have to also essentially re-bind it by doing that trick there with the Run button. It seems like this should be automatic, and maybe in some cases it is, but it wasn't the case here.

Thanks again so much.



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
September 24, 2013, 02:00 PM
MAdams1
@ Francis If you right click on the report control in the design tab in the HTML Composer you will see the 'refresh parameters'. I have used this often. Usually it works. I was once told by IBI that you should always put a report control on the HTML page, then add the fex it will use, and to let the Composer add the parameters. I rarely do it this way.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML