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 am passing parms from a fex to a html page. For the values that are blank, the very first space is taken by a blank in the text field of the html page. You have to highlight the blank and delete, or you have a blank space in the table. Also, if the character limit is 10, and you are keying all 10, it will only let you key 9 until you delete the blank.
I have tried passing FOC_NONE, _FOC_NULL, and MISSING but the actual text displayed. How do I remove the blank space? Thanks!This message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 768 OS/400 HTML, also quite a few active reports and excel.
Sure. Here's an abbreviated version using CAR. I don't see any empty values in that file, so I computed one.
-*newfex.fex -SET &CAR='JAGUAR'; -SET &MODEL='V12XKE AUTO'; TABLE FILE CAR PRINT BODYTYPE COMPUTE NEWVALUE/A1 MISSING ON=IF SEATS EQ 2 THEN MISSING ELSE '2'; WHERE (CAR EQ '&CAR') AND (MODEL EQ '&MODEL'); ON TABLE SET HOLDLIST PRINTONLY ON TABLE HOLD AS HOLD1 FORMAT ALPHA END -RUN -READ HOLD1 &BODYTYPE.A12 &NEWVALUE.A1 -HTMLFORM newhtm.htm
-*newhtm.htm < !-- Generated by Report Layout Painter --> < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<script id=IBI_OptionsScript type=text/javascript> var cgipath = "cgipath"; var ibirls = "ibirls3"; var rltdyncalendar = "rltdyncalendar"; var gmap = "ibigmap"; var olap="olap"; var olappanebase="olappanebase"; var olapdrill="olapdrill"; var ibixmltree="ibixmltree"; var ibiOptions = new Array(cgipath,ibirls);
Well you could always add this after your read command:
-SET &NEWVALUE = IF &NEWVALUE EQ ' ' THEN '' ELSE &NEWVALUE;
Of course the missing value changes depending on what version you are in...
EDIT: To insure this won't be a problem in future releases I would change your code to look like this:
SET HNODATA = '.';
-*newfex.fex
-SET &CAR='JAGUAR';
-SET &MODEL='V12XKE AUTO';
TABLE FILE CAR
PRINT
BODYTYPE
COMPUTE NEWVALUE/A1 MISSING ON=IF SEATS EQ 2 THEN MISSING ELSE '2';
WHERE (CAR EQ '&CAR') AND (MODEL EQ '&MODEL');
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HOLD1
END
-RUN
-READFILE HOLD1
-SET &NEWVALUE = IF &NEWVALUE EQ '.' THEN '' ELSE &NEWVALUE;
-HTMLFORM newhtm.htm
This HNODATA sets the hold format for NODATA. READFILE is just an added bonus ;DThis message has been edited. Last edited by: J,
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
I've tried the IF &NEWVALUE EQ ' ' THEN ''. I still get the same result. I thought about initializing the field onload using javascript, but I'm not that familiar with javascript and not sure what the syntax would look like.
My other thought is to up the character count of the html field, and do a TRIM on the fex that is ran when when the input/button is submitted.
WebFOCUS 768 OS/400 HTML, also quite a few active reports and excel.
I was able to use HNODATA, but it gave me the same result on the html page. I'm starting to think this is an affect of the html coding and not the fex. Even if I change the &NEWVALUE to an input parm instead of computing, and don't populate a value in the prompt, it still passes holds a blank space in the html text box.
SET HNODATA = -SET &CAR='JAGUAR'; -SET &MODEL='V12XKE AUTO'; -SET &NEWVALUE=&INPUT1.Type Newvalue Here.; TABLE FILE CAR PRINT BODYTYPE WHERE (CAR EQ '&CAR') AND (MODEL EQ '&MODEL'); ON TABLE SET HOLDLIST PRINTONLY ON TABLE HOLD AS HOLD1 FORMAT ALPHA END -RUN -READ HOLD1 &BODYTYPE.A12 -HTMLFORM newhtm.htm
WebFOCUS 768 OS/400 HTML, also quite a few active reports and excel.
This will just reset NODATA back to the default value with a space. You must put a value in (I used '.' above) and then test for that value after the read command.
I don't know about the input value, it might be specific to your version. Is your tag updated correctly (WebFOCUS 768)?
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
-*newfex.fex
-SET &CAR='JAGUAR';
-SET &MODEL='V12XKE AUTO';
TABLE FILE CAR
PRINT
BODYTYPE
COMPUTE NEWVALUE/A1 MISSING ON=IF SEATS EQ 2 THEN MISSING ELSE '2';
WHERE (CAR EQ '&CAR') AND (MODEL EQ '&MODEL');
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
-READ HOLD1 &BODYTYPE.A12 &NEWVALUE.A1
-SET &BODYTYPE = IF &BODYTYPE EQ ' ' THEN '"""' ELSE &BODYTYPE;
-SET &NEWVALUE= IF &NEWVALUE EQ ' ' THEN '"""' ELSE &NEWVALUE;
-HTMLFORM newhtm.htm
or
-*newfex.fex
-SET &CAR='JAGUAR';
-SET &MODEL='V12XKE AUTO';
TABLE FILE CAR
PRINT
BODYTYPE
COMPUTE NEWVALUE/A2 = IF SEATS EQ 2 THEN '""' ELSE '2';
WHERE (CAR EQ '&CAR') AND (MODEL EQ '&MODEL');
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
-READ HOLD1 &BODYTYPE.A12 &NEWVALUE.A2
-HTMLFORM newhtm.htm
or
-*newfex.fex
SET HNODATA = ""
-SET &CAR='JAGUAR';
-SET &MODEL='V12XKE AUTO';
TABLE FILE CAR
PRINT
BODYTYPE
COMPUTE NEWVALUE/A2 MISSING ON = IF SEATS EQ 2 THEN MISSING ELSE '2';
WHERE (CAR EQ '&CAR') AND (MODEL EQ '&MODEL');
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
-READ HOLD1 &BODYTYPE.A12 &NEWVALUE.A2
-HTMLFORM newhtm.htm
This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007