Focal Point
HTML Composer: Basic Question #1: How get rid of unwanted "Unbound Parameters?

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

March 11, 2013, 10:32 PM
Francis Mariani
HTML Composer: Basic Question #1: How get rid of unwanted "Unbound Parameters?
HTML Composer: Basic Question #1: How get rid of unwanted "Unbound Parameters? I don't want these things in my HTML file.

This message has been edited. Last edited by: Francis Mariani,


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
March 12, 2013, 02:39 AM
Dave
Basic obvious question back : Why are there unbound parameters? You are calling a procedure what needs parameters. If the HTML doesn't provide them. Autoprompt will appear.

If they're parameters that not need user-input you might want to add:

-DEFAULTH &INTERNAL_ID = 0;

This will make the Composer accept the fact that this parameter does not need to be bound.

G'luck


_____________________
WF: 8.0.0.9 > going 8.2.0.5
March 12, 2013, 07:28 AM
David Glick
Agree with Dave. If you have unbound parameters, they came from somewhere and should be handled.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
March 12, 2013, 10:45 AM
Francis Mariani
Of course they come from somewhere. They come from -DEFAULT statements. These are in a common module that is called in many programs. Why do -DEFAULT statements generate unwanted unbound parameters? Why would we need to modify all -DEFAULT statements that are in a fex to -DEFAULTH statements?


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
March 13, 2013, 04:22 AM
Dave
Francis,

-DEFAULT
suggests a value for the end-user ( in MRE and autoprompt anyway )

-DEFAULT &USER_INPUT = 'TOYOTA';

TABLE FILE CAR
	SUM SALES
	BY CAR
WHERE CAR EQ '&USER_INPUT'
END

This will prompt the user for input and 'TOYOTA' is already in the textbox.



-DEFAULTH
This works different. This will set a variable to this value. But only when the variable is not supplied.

Does the same as :
-SET &USER_INPUT = IF ( &USER_INPUT.EXIST ) AND ( &USER_INPUT NE '' OR ' ' ) THEN &USER_INPUT ELSE 'TOYOTA';

And it will tell the HTML-composer that &USER_INPUT is not a mandatory variable... ...hence no 'UNBOUND' issues


Hope this helps.
Good luck !


_____________________
WF: 8.0.0.9 > going 8.2.0.5
March 13, 2013, 07:20 AM
David Glick
Some applications want to use -DEFAULT values and some do not. If you want to use them, then you can leave them unbound. For those that just want them as a default but allow their users to change them, they create controls for them.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
March 13, 2013, 10:10 AM
Francis Mariani
I want to get rid of these unbound parameters. Why can't I right-click on one and select Delete?


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
March 13, 2013, 10:46 AM
susannah
f, you can just erase them from the code, if you open the html in mre or some text editor
i trick the system when i'm building a launch page with a bunch of -INCLUDED stuff where the developer didn't have sense enuf to DEFAULTH
...
i connect my run button to a fex that isn't the actual report, just a container that =DEFAULT s only the variables i want to appear on my launch page. and that container fex does nothing more than just -TYPE them out.
..and once the launch page suits me, i replace the container name with the actual fex name, or -INCLUDE the actual fexname in the container..
and then in mre, i comment the fexname with ' ... dont open this in devstu'
but you know way more than all this already so i suspect you're just saying 'why isn't this easier?' to which i agree




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 13, 2013, 07:33 PM
Dan Satchell
Francis,

If you're going to use the GUI tools, you will need to change your by-line: "An old coder never leaves a mess". Confused


WebFOCUS 7.7.05
March 13, 2013, 08:21 PM
susannah
speaking of a mess....we hired a consultant here who wrote a launch page that was seven thousand ines line, count'em , 7 whole thousand!
ibi employee, too!... when i discovered it some years later, i recranked it...200 lines....that's all any self-respecting launch page should be.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 14, 2013, 12:40 AM
Francis Mariani
Seven thousand lines of GUI?


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
March 14, 2013, 03:55 AM
Dave
Francis,

it's not about deleting unbound parameters in the GUI.

It's about those parameters being in the fex you're calling in the first place. You can't blame the GUI for letting you know the fex -needs- those parameters.

....

7K lines of code???
I'm getting more and more the feeling that.. yeah anything is possible with WF because you can code it yourself...
...but you have to code MOST of it yourself. It lacks ( imho ) some basic functionality you'd expect.
I'm hoping WF8 is better?


_____________________
WF: 8.0.0.9 > going 8.2.0.5
March 14, 2013, 09:53 AM
susannah
7k lines i think came from a 'copy paste'...some code brought from this consultant's previous jobs...and just slapped in without having a clue...bucketload of script what was never referenced anywhere in the page.... zut alors!
March 14, 2013, 09:57 AM
Francis Mariani
Why is the assumption made that all -DEFAULT variables need to be added to an HTML Composer screen. -DEFAULT existed long before HTML Composer came along. A new command should have been created to work hand-in-hand with HTML Composer. Perhaps -DEFAULTH should have been added as THE command to use when the variable needs to be added as an HTML Composer variable, instead of adding -DEFAULTH as the command to avoid them from going into the page.

So, I made the mistake of pointing to a fex that has a -INCLUDE with a bunch of -DEFAULT commands. Now, how do I get rid of them with the GUI? Why isn't there a pont-and-click method to remove them? I fear rebinding my Composer page back to the fex will remove a lot of options painstakingly entered through pointing-and-clicking.


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
March 15, 2013, 04:14 AM
Dave
Francis,

You're absolutely right. Functionality shouldn't change with the arrival something new.

However. In the beginnen when we didn't use HTML either. I still did not use -DEFAULT because it would fire autoprompt. Unless I switch off "prompt for parameters" which I don't because I need those other parameter in the prompt.

-DEFAULTH doesn't fire autoprompt for that parameter.

When I switch off "prompt for parameters" to get it to work...

But, cut to the chase, I do have some solutions for you, perhaps:
1. Just ignore the fact the HTML-composer tells you about unbound paramters. Your .fex works fine without any data in these parameters. Only bind what you need, ignore the rest.

2. Add a 'fixer'. E.g. If you have the following -DEFAULTs in your fexi:
-DEFAULT &A = 1;
-DEFAULT &B = 52;
-DEFAULT &C = 2012;
-DEFAULT &D = 2013;

Make a fex file: ( fool_the_composer.fex )
-DEFAULTH &A = 0;
-DEFAULTH &B = 0;
-DEFAULTH &C = 0;
-DEFAULTH &D = 0;

and just add the following to the beginning of all your fexi.
-INCLUDE /fool_the_composer.fex

And you can even use the HTML composer to figure out which parameters to add to this fixer. At least you don't need really change you existing fexi.



Hope this helps.



PS>
Come to think of it... what IS the use of -DEFAULT anyway? Why not use -SET ?


_____________________
WF: 8.0.0.9 > going 8.2.0.5