Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Pass null value to html
Go
New
Search
Notify
Tools
Reply
  
[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: 58 | Registered: June 18, 2009Reply With QuoteReport 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.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6114 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport 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: 58 | Registered: June 18, 2009Reply With QuoteReport 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, 2012Reply With QuoteReport 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: 58 | Registered: June 18, 2009Reply With QuoteReport 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: 58 | Registered: June 18, 2009Reply With QuoteReport 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: 58 | Registered: June 18, 2009Reply With QuoteReport 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: 58 | Registered: June 18, 2009Reply With QuoteReport 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, 2012Reply With QuoteReport 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, 2012Reply With QuoteReport 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: 58 | Registered: June 18, 2009Reply With QuoteReport 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, 2012Reply With QuoteReport 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: 58 | Registered: June 18, 2009Reply With QuoteReport 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, 2012Reply With QuoteReport 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, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

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

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.