Focal Point
[SOLVED] HTML Form Custom Message

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

May 29, 2020, 12:08 PM
JulieA
[SOLVED] HTML Form Custom Message
Everyone,

I've run into a minor snag. I've been using a custom HTML Form to provide some custom messages in certain situations. The messages don't always work in 8.2.04. I suspect it has something to do with my SET commands.

Here's my code:

-IF &RECORDS GT 0 GOTO NEXT;
-HTMLFORM BEGIN
<p style="color: #000000; font-size:18px; font-family: Calibri;">

		<br>The selected combination is not valid.
</p>

-HTMLFORM END
-#NEXT  


Here is a list of my SET commands, too.
SET EMGSRV=OFF
SET MESSAGE = OFF
SET ERROROUT = OFF
SET WARNING = OFF
SET TRMOUT = OFF
SET MSG = OFF
SET ASNAMES = OFF
SET HOLDATTR = OFF
SET EMPTYREPORT = OFF  


Below I have provided a reference to a post I had on this similar subject.
 [CLOSED] HTML FORM CUSTOMIZATION OF ERROR MESSAGES 


Right now, I get the standard No Ouptut Returned.

I'm probably overlooking something simple, but I'd appreciate any advice. Thank you.

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus 8.2.04
WebFocus 8.2.04

May 29, 2020, 02:19 PM
Doug
You don't show a target for your GOTO NEXT. However, there is a -#NEXTtarget. The -HTMLFORM by itself runs fine...
-IF &RECORDS GT 0 GOTO NEXT;
-HTMLFORM BEGIN
<p style="color: #000000; font-size:18px; font-family: Calibri;">

		<br>The selected combination is not valid.
</p>

-HTMLFORM END
-#NEXT

June 02, 2020, 03:45 PM
JulieA
Thank you for the reply.

I think I am missing something in the translation.

If I understand what you are saying, I need something for the -#NEXT target.

This error message is at the end of my report, and if the report generates no records, I want the HTML form to run in its place.

If the report generates any records, it should run appropriately.

Right now, sometimes, I get the standard no output error. Other times I get my HTML FORM below my report headings without a report, and still in other instances, I get the HTFML form text by itself.

I know I am missing something.

Usually, when using Dialog Manager, you have GOTO FORM.

Then, -FORM

THEN LBL_END

Does HTMLFORM work the same way?


WebFocus 8.2.04
WebFocus 8.2.04

June 02, 2020, 04:11 PM
MartinY
What Doug is saying is that you have a reference to NEXT but this label does not exist.
The only existing label is : #NEXT
They must match

-IF &RECORDS GT 0 GOTO NEXT;
-HTMLFORM BEGIN
<p style="color: #000000; font-size:18px; font-family: Calibri;">

		
The selected combination is not valid.
</p>
-#NEXT



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 08, 2020, 03:05 PM
JulieA
Thank you, MartinyY, for that clarification.

The code is code I found on the forum exactly and have been using since 2015. It has worked as it is all these years.

I have discovered the issue with the HTML form. It has to do with our master files of data behind the scenes.

Thank you everyone.


WebFocus 8.2.04
WebFocus 8.2.04