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.
Still new to WebFocus (ver 7.7.02) and I built a report that would require users to check a box for YES or leave the box blank for NO.
My Version 1 WHERE statements look like this (WHERE/IF > Column EQUALS Parameter > Compare Variable (Variable Type: SINGLE SELECT) > Static List:
WHERE TABLE1.TABLE1.A_ALUMNI EQ '&A_ALUMNI.(<Y,Y>).A_ALUMNI.';
WHERE TABLE1.TABLE1.A_DONOR EQ '&A_DONOR.(<Y,Y>).A_DONOR.';
WHERE TABLE1.TABLE1.B_ALUMNI EQ '&B_ALUMNI.(<Y,Y>).B_ALUMNI.';
WHERE TABLE1.TABLE1.B_DONOR EQ '&B_DONOR.(<Y,Y>).B_DONOR.';
*The reason why I didn't put "No Selection" or
<N,N>
is because I only want ONE checkbox per variable, not TWO.*
My Version 2 WHERE statements look like this (WHERE/IF > Column EQUALS Parameter > Compare Variable (Variable Type: SIMPLE):
WHERE TABLE1.TABLE1.A_ALUMNI EQ '&A_ALUMNI';
WHERE TABLE1.TABLE1.A_DONOR EQ '&A_DONOR';
WHERE TABLE1.TABLE1.B_ALUMNI EQ '&B_ALUMNI';
WHERE TABLE1.TABLE1.B_DONOR EQ '&B_DONOR';
On the HTM file, I referenced the report and it automatically brought in the variables and I chose 'checkbox' in the CONTROL TYPE column. In the properties, I set it so that all boxes are NOT selected to allow the user to make the selection of which information they want to display. But when I run EITHER VERSION, I have red boxes that go around the unchecked boxes, indicating that a selection is required.
How do I make it ONE checkbox per field instead of a YES box and NO box (I also don't want a drop down of YES or NO... specifically one checkbox). Is there something I'm doing wrong in the WHERE/IF in the GUI? Or is it something I need to do on the HTM file of the checkbox properties?
Thanks!This message has been edited. Last edited by: Kerry,
8009 Windows 7 Excel/HTML/AHTML/PDF
Posts: 34 | Location: San Francisco, CA | Registered: July 25, 2011
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
I updated the report with both of your suggestions so that I have:
-DEFAULT &A_ALUMNI = 'N'
-DEFAULT &A_DONOR = 'N'
-DEFAULT &B_ALUMNI = 'N'
-DEFAULT &B_DONOR = 'N'
...
...
WHERE TABLE1.TABLE1.A_ALUMNI EQ '&A_ALUMNI';
WHERE TABLE1.TABLE1.A_DONOR EQ '&A_DONOR';
WHERE TABLE1.TABLE1.B_ALUMNI EQ '&B_ALUMNI';
WHERE TABLE1.TABLE1.B_DONOR EQ '&B_DONOR';
I also selected each checkbox, and in the properties pane, I set: Default Selection: No (also tested with Default Selection: Yes) Selection Required: No (thanks for this @njsden!)
When I run it with ALL boxes checked, the report hangs and freezes everything until I can open the Task Manager to end IE. But if any of the boxes are unchecked, I get this error instead of any actual results:
Your request did not return any output to display. Possible causes: - No data rows matched the specified selection criteria. - Output was directed to a destination such as a file or printer. - An error occurred during the parsing or running of the request.
Everyone in TABLE1 has AT LEAST one 'Y' in any of the columns A_ALUMNI, A_DONOR, B_ALUMNI, or B_DONOR. Should I have an "ELSE" somewhere in the -DEFAULT maybe? So if it's unchecked = 'N' for No and checked = 'Y' for Yes?
@Wep5622: For those ALUMNI & DONOR fields, the output is either Y or N (Yes/No). I use the WHERE/IF button in the fex Report Painter and use the Assist button to select: Column to Filter: TABLE.TABLE.COLUMN Logical Relation: Equals Compare Type: Parameter Compare Value: '&COLUMN'
8009 Windows 7 Excel/HTML/AHTML/PDF
Posts: 34 | Location: San Francisco, CA | Registered: July 25, 2011
-SET &A_ALUMNI=IF &A_ALUMNI EQ ' ' THEN 'N' ELSE 'Y';
-SET &A_DONOR=IF &A_DONOR EQ ' ' THEN 'N' ELSE 'Y';
-SET &B_ALUMNI=IF &B_ALUMNI EQ ' ' THEN 'N' ELSE 'Y';
-SET &B_DONOR=IF &B_DONOR EQ ' ' THEN 'N' ELSE 'Y';
-DEFAULT &A_ALUMNI = ' '
-DEFAULT &A_DONOR = ' '
-DEFAULT &B_ALUMNI = ' '
-DEFAULT &B_DONOR = ' '
...
...
WHERE TABLE1.TABLE1.A_ALUMNI EQ '&A_ALUMNI';
WHERE TABLE1.TABLE1.A_DONOR EQ '&A_DONOR';
WHERE TABLE1.TABLE1.B_ALUMNI EQ '&B_ALUMNI';
WHERE TABLE1.TABLE1.B_DONOR EQ '&B_DONOR';
When I run the .fex by itself as an AHTML and leave any of the text boxes blank with any multiple of them entered as Y, the report works. Where I put the Y's, those get pulled - and any of them with blanks come up as N's. It ran quickly and looks great. Perfect, right?
However, when referencing the procedure from the HTML Composer with Control Types changed from 'Text box' to 'Check Box', it doesn't work. I set each check box to unchecked and 'Selection Required: No' - and have tested 'Default Selection: Yes' and 'Default Selection: No' for all for two separate test runs, it will say "Loading..." and then the report frame box goes blank and the corner of my IE window says "Done". But no output like when I ran the fex.
I assume this is due to the SET and DEFAULTs, but I can't think of how to say if the CHECK BOX is unchecked then N else Y. Any ideas?
8009 Windows 7 Excel/HTML/AHTML/PDF
Posts: 34 | Location: San Francisco, CA | Registered: July 25, 2011
-SET &ANYTEXT1 = IF &A_ALUMNI EQ 'N' THEN 'N' ELSE 'Y';
-SET &ANYTEXT2 = IF &A_DONOR EQ 'N' THEN 'N' ELSE 'Y';
?
The reason I ask is because I mainly do this through the GUI and I don't see a &CHECKBOXPARM option. I also don't know how to get the HTML to realize that unchecked = 'N'. Is there some javascript I would need to add, or is working in the GUI enough?
Sorry if my description is a bit confusing. I'm still learning WF and this is the first time I'm trying checkboxes. I tried the HELP files, but it shows me to click the Event Handler using an icon with a lightning bolt and I've checked every icon and don't see it.
I feel like I'm making this more complicated than this probably is
8009 Windows 7 Excel/HTML/AHTML/PDF
Posts: 34 | Location: San Francisco, CA | Registered: July 25, 2011
I'm not sure how familiar you are with HTML. Checkboxes work by assigning specific values for each option. So, if you look at your html code, you should see something like this:
See that value= parameter? That dictates what gets passed to your fex in webfocus. You set those values in the Parameter tab of the HTML Layout Painter. If you would have had the No option where you have 2 checkboxes for the same variable (A_ALUMNI), you would see something like this:
That gives you both options - a Y or N value passed because that's what you put as the value= on the checkboxes - that is, you assigned 2 values in the Parameter tab (it's an either/or, you can't check both).
The NAME= parameter tells you what & variable the values are going to go to.
But, since you only want 1 checkbox - the Yes box, then you only have 1 value that you passed to the focexec - and that's whatever value you put in the Parameter tab... I guess in your case you made it a Y. So, if you don't check the box, then you will get a null value. Now, the -DEFAULT in your fex is going to be over-ridden by the null value if you don't check a box.
So... in your focexec, you will then need to account for an unchecked value if you want that to mean No. Hence, Francis gave you a sample logic of how you can do this in the focexec. Basically, the idea is - if the value is passed (&A_ALUMNI=Y), then you got a YES, otherwise (any other value) you got a No.
Okay, so this makes more sense, I'll put a super generic HTML and Focexec here that you can use to practice on: