Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Pass null value to html

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Pass null value to html
 Login/Join
 
Gold member
posted
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.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Expert
posted Hide Post
How are you populating the HTML page ?

Is the fex returning it ?

Is it being populated by other methods ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
I am populating the html page by a fex. I am using the html page as a display and input screen. I am them passing the parms back to a fex.


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Guru
posted Hide Post
Can we see your code (especially if you can reproduce it with a CAR example)?


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, 2012Report This Post
Gold member
posted Hide Post
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_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}


<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);


<script id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js">

<script id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js">

<script id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js">

<script id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");

HtmlPage
<script id=clientEventHandlersJS type=text/javascript>
function window_onload() {
UpdateData();
}


<script for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }



Bodytype
Blank Input Field





<script type="text/xml" nextelementuniquenumber="3">

































<script id=IBI_loader type=text/javascript>
doBeforeLoad();



WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Gold member
posted Hide Post
Not sure what happened to my html code:



< !-- Generated by Report Layout Painter -->
< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">




<script id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}

<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);

<script id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js">
<script id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js">
<script id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js">
<script id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");

HtmlPage
<script id=clientEventHandlersJS type=text/javascript>
function window_onload() {
UpdateData();
}

<script for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }



Bodytype
Blank Input Field





<script type="text/xml" nextelementuniquenumber="3">


















<script id=IBI_loader type=text/javascript>
doBeforeLoad();



WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Gold member
posted Hide Post
This isn't working. Here are my two html input fields.





WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Gold member
posted Hide Post
value=!IBI.AMP.BODYTYPE;

value=!IBI.AMP.NEWVALUE;


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Guru
posted Hide Post
Put the code between
 [CODE] [/ CODE]  
the code button looks like
 </> 

This 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, 2012Report This Post
Guru
posted Hide Post
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 ;D

This 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, 2012Report This Post
Gold member
posted Hide Post
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.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Guru
posted Hide Post
Read my most recent post via the forums..is HNODATA available for your release?


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, 2012Report This Post
Gold member
posted Hide Post
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.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Guru
posted Hide Post
quote:
Originally posted by Amber:

SET HNODATA =
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, 2012Report This Post
Virtuoso
posted Hide Post
Use a value of "" when blank:
-*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, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Pass null value to html

Copyright © 1996-2020 Information Builders