Focal Point
Adding html code in Wf

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4591078331

July 15, 2005, 10:35 AM
<mohith>
Adding html code in Wf
-PROMPT &CUSTID.(SELECT,ALFKI).PLEASE SELECT

SET SQLENGINE = SQLMSS
SQL
EX CUSTORDERHIST '&CUSTID';
TABLE FILE SQLOUT
ON TABLE HOLD AS TEMPFILE
END
-RUN

TABLE FILE TEMPFILE
END

ON TABLE SET ONLINE-FMT &OUTFMT
END
-HTMLFORM BEGIN
<HTM>
<DIV ALIGN="CENTER">
!IBI.FIL.TEMPFILE</DIV>
</HTM>
-HTMLFORM END


I am not getting any output. What is the error in this code??
July 15, 2005, 01:03 PM
jimster06
'TABLE FILE TEMPFILE' appears to be lacking a verb and verb objects.
July 15, 2005, 01:31 PM
Francis Mariani
There's several things wrong with the code.

As Jimster06 pointed out,
TABLE FILE TEMPFILE
END

Will not do anything.

An END statement ends the WebFOCUS request.

ON TABLE SET ONLINE-FMT &OUTFMT

will not do anything because of the previous END statement.

!IBI.FIL.TEMPFILE syntax should be !IBI.FIL.TEMPFILE; (semi-colon at the end of file name).
July 15, 2005, 05:36 PM
susannah
i second everything Francis said
and just note that i find it safer, in IE ,
to put the div tags on its ownline after a serverside include
<div align=center>
!ibi.fil.thing;
</div>
July 16, 2005, 10:47 AM
Cyril Joy
Hope this program helps:

-PROMPT &CUSTID.(SELECT,ALFKI).PLEASE SELECT

SET SQLENGINE = SQLMSS
SQL
EX CUSTORDERHIST '&CUSTID';
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS TEMPFILE FORMAT ALPHA
END
-RUN

-HTMLFORM BEGIN
<HTM>
!IBI.FIL.TEMPFILE;
</HTM>
-HTMLFORM END

You can even call an html page from outside instead of creating an html within focus procedure.

Create an html page inside the same folder where you are having fex files and call that file from the procedure.
-HTMLFORM HTMLFILE