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     [solved] HTML - How to get the result to pass error msg

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved] HTML - How to get the result to pass error msg
 Login/Join
 
Platinum Member
posted
I have a text box that the user enters a search string -- and then a combo box populates based on that variable - That works correctly -- My problem is that if there is no match I want to inform the user of that.

1. Best option - to have a message in the combo box that says record not found -
OR
2. Pop up an alert in the window that says not found

I tried to code along these lines:
TABLE FILE CAR
PRINT MODEL
IF MODEL EQ &MODEL
ON TABLE PCHOLD FORMAT XML
END

-RUN
-IF &RECORDS NE 0 GOTO GO-ON;
TABLE FILE CAR
PRINT COMPUTE
MSG/A20 = 'NOT FOUND';
BY MODEL
IF MODEL EQ 'XX'
ON TABLE PCHOLD FORMAT XML
END
-GO_ON

THE PROBLEM: The second table file does not ever seem to execute -- seems like there is a limit to the number of table files that can be executed --

This must be a basic thing so ... anyone with an answer I would be quite appreciative. Help!

This message has been edited. Last edited by: Vivian,


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
Expert
posted Hide Post
One thing you should notice in your code is that your label is not the same as the goto so would not work.

Try this code -

SET HOLDLIST = PRINTONLY
-DEFAULTH &Country = 'ENGLAND'
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY EQ '&Country'
ON TABLE SAVE
END
-RUN
-IF &RECORDS EQ 0 THEN GOTO :Not_Found;
PCHOLD FORMAT XML
-EXIT
-:Not_Found
TABLE FILE CAR
SUM COMPUTE COUNTRY/A10 = 'NOT FOUND';
BY HIGHEST 1 COUNTRY NOPRINT
IF READLIMIT EQ 1
ON TABLE PCHOLD FORMAT XML
END
-RUN

Change ENGLAND to ENGLANDS to see the different output.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
The different labels was a typo on my part -- but I am going to try the -exit approach -- will keep you posted. Thanks!

Update: That did work! Thank you so much Tony -

This message has been edited. Last edited by: Vivian,


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
Expert
posted Hide Post
My pleasure, glad it worked for you.

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
quote:
IF MODEL EQ &MODEL
ON TABLE PCHOLD FORMAT XML
END

Since you are using PCHOLD in your first request, response will be sent to client browser immediately after this even if server continues to execute rest of the code.

-Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report 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     [solved] HTML - How to get the result to pass error msg

Copyright © 1996-2020 Information Builders