As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have a HTML launch page for one of my reports and I am having some trouble with it.
There is a checkbox parameter &OPTION1 which is either Yes or No... I am trying to do this and it throws an error saying missing value for &SELECTPROC... what am I doing wrong here?
-SET &SELECTPROC = 'FOC_NONE'; (I used DEFAULT too here, nothing helps - still get same error)
-IF &OPTION1 EQ 'No' THEN GOTO label1;
-IF &OPTION1 EQ 'Yes' AND &SELECTPROC EQ 'ABC' THEN GOTO labelABC ELSE IF &OPTION1 EQ 'Yes' AND &SELECTPROC EQ 'XYZ' THEN GOTO labelXYZ;
Please help! Thanks!This message has been edited. Last edited by: Nova27,
And the proper syntax would be _FOC_NONE (underscroe in the beginning )
Sorry Dave, that is not true for FOC_NONE. There is no leading underscore.
Nova, and other newbies,
FOC_NONE is nearly the oldest form of "ignore selection" for an amper variable that there is.
"$*" used to be used for "anything in the first character position and ignore the rest" but it didn't help when selecting against single character strings - hence FOC_NONE was introduced.
The way in which FOC_NONE worked was to basically ignore the line and remove it from the execution stack. It would still get parsed (and prompted if autoprompting turned on and not -SET) and can cause errors like the one Nova is experiencing.
In later years "_FOC_NULL" was introduced to help in this situation and, of course, FOC_NONE had to remain available for backward compatibility ().
What you can do is use the amper variable "operators" like .EVAL, but .EVAL will not work in this instance.
However, .QUOTEDSTRING will
T
-SET &OPTION1 = 'Yes';
-SET &SELECTPROC = 'FOC_NONE';
-IF &OPTION1 EQ 'No' THEN GOTO label1;
-IF &OPTION1 EQ 'Yes' AND &SELECTPROC.QUOTEDSTRING EQ 'ABC' THEN GOTO labelABC ELSE IF &OPTION1 EQ 'Yes' AND &SELECTPROC.QUOTEDSTRING EQ 'XYZ' THEN GOTO labelXYZ;
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
No luck with trying all your suggestions I still get the same error: A VALUE IS MISSING FOR &SELECTPROC..
Here's my code:
-DEFAULTH &DEBITPROC = '_FOC_NULL';
........
..........
TABLE FILE ABCD
PRINT
TEXT1 OVER
TEXT2 OVER
-IF &OPTION1 EQ 'No' THEN GOTO :NODEBITPROC ELSE GOTO :RESOLVEDEBITINFO;
-:RESOLVEDEBITINFO
-IF &OPTION1 EQ 'Yes' AND &SELECTPROC.EVAL EQ 'CTP' THEN GOTO :CTP ELSE IF &OPTION1 EQ 'Yes' AND &SELECTPROC.EVAL EQ 'Everlink' THEN GOTO :Everlink;
-:NODEBITPROC
TEXT3 OVER
TEXT4 OVER
TEXT5
-GOTO :COMPLETE
-:CTP
......
.....
-GOTO :COMPLETE
-:Everlink
........
.......
-GOTO :COMPLETE
-:COMPLETE
.......
WHERE ...........
ON TABLE PCHOLD FORMAT PDF
.........
END
Basically I have a checkbox on my HTML page which passes Yes or No value to &OPTION1.. If it No then I don't do anything special, just carry on with my report... If it is Yes, then depending on what is the value for &SELECTPROC, I have to print address for either CTP or Everlink .... and that is what I am trying to achieve in this part of my report...
P.S.: there is a lot of other logic going on in the report, but this is the only place where I use these parameters..
Add -SET &ECHO=ALL; to the very beginning of your code, so you can see what's being substituted in the variables. If it's saying value is missing for your variable, you'll know why, when you look at the code after all the -SETs and -DEFAULTs have been resolved and you'll get a better idea of where you're having problems.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
That's exactly what I tried doing... I used -TYPE statement at the very beginning too, to see what's being passed to these variables through the HTML page, but it just doesn't show up...
so I have my SET or DEFAULTH statement and after that I have -TYPE to see the values, but it doesn't show up when the fex runs.. only shows the error for missing value...
also, I have a SQL query which runs and stores the results on a HOLD file before I have this -IF ELSE statement logic, the query runs because I see the file format in the output followed by the MISSING VALUE FOR &SELECTPROC error...
I just tried running the fex as a stand-alone(supplied values for parameters when the fex procedure auto-prompted for them) as opposed to supplying values through the HTML page; and the report runs fine... results are as expected ...
I am not sure why the -DEFAULTH &SELECTPROC = '_FOC_NULL'; does not work with HTML, but works when I run the fex as a stand-alone
P.S.: I had tried turning off the auto-prompting feature for the fex while running it through the HTML page, didn't work.. Turned it on too and it still didn't work...
WebFocus works in such a peculiar way!!!! Uuuuggghhhhh!!! I had to make sure that I had ALL my SETs or DEFAULTS for the amper variables typed out in my fex before building a HTML page for the report. If I made any changes (like, introducing a new DEFAULTH statement in my fex) then the HTML composer does not comprehend it correctly and wouldn't pass the right value.
So I had to create my HTML page from scratch (after making sure my fex was ready with everything I wanted), then import my fex into the HTML page, link my parameters and I am now good to go.... PHEW!!!!!
I have noticed this during my short time with WF - when you are attempting to build GUIs for your fex, the order in which you carry out each task is most important, because if you forget something or change the order of things, your report just won't work
I hope this is true only for this version and has been resolved in newer versions.
When you make changes to a REFERENCEd report, you can refresh the parameters in Composer, so it knows you've made changes. You don't have to recreate it from scratch.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015