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] Is it possible to evaluate for missing parameter in WF report?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Is it possible to evaluate for missing parameter in WF report?
 Login/Join
 
Member
posted
What would be the correct syntax in order to output 'none selected' when input text box on launch page contains no entered data or word NULL, output 'ALL' when 'all' typed into the input box or the specific unit number if entered?

BTW launch page designed to pass values through xml containers.

Consider the following:

-SET &UNIT_HDR = IF &UNIT_NO IS MISSING THEN 'None Selected' ELSE
- IF UPCASE(4, &UNIT_NO, 'A4') EQ 'NULL' THEN 'POTATO VALU' ELSE
- IF UPCASE(3, &UNIT_NO, 'A3') EQ 'ALL' THEN 'ALL' ELSE &UNIT_NO;

Entering nothing in the corresponding field on the launch page produces 'None Selected', as does a space character. As a test, when entering Null in the unit no input box on the launch page, I expected to see a header with words 'Potato Valu'. Instead, it also returned 'None Selected'. Entering a specific unit number also resulted in 'none Selected'.

Data received from report source looked like this:

-SET &UNIT_HDR = IF NULL IS MISSING THEN 'None Selected' ELSE
- IF UPCASE(4, NULL, 'A4') EQ 'NULL' THEN 'POTATO VALU' ELSE
- IF UPCASE(3, NULL, 'A3') EQ 'ALL' THEN 'ALL' ELSE NULL;

Is there a better way to do parameter evaluation?

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


7.6.4
XP SP3
EXL2K, HTML, PDF
 
Posts: 26 | Location: Ohio | Registered: April 13, 2009Report This Post
Expert
posted Hide Post
IS MISSING is incorrect syntax for Dialogue Manager. To determine the existence of a Dialogue Manager variable, use the EXIST suffix:

IF &UNIT_NO.EXIST EQ 0

See documentation: Developing Reporting Applications > Managing Flow of Control in an Application > Customizing a Procedure With Variables > Screening a Variable Value.

The whole Dialogue Manager IF statement gets evaluated, so, unfortunately, when EXIST is used in a complex IF statement, and the variable does not exist, the IF statement fails with an error.

Instead, and it makes life easier, add a default setting in the program. e.g.:

-DEFAULT &UNIT_NO = '';

-SET &UNIT_HDR = IF &UNIT_NO EQ '' THEN 'None Selected' ELSE
- IF UPCASE(4, &UNIT_NO, 'A4') EQ 'NULL' THEN 'POTATO VALU' ELSE
- IF UPCASE(3, &UNIT_NO, 'A3') EQ 'ALL' THEN 'ALL' ELSE &UNIT_NO;

-TYPE &UNIT_HDR


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
IS MISSING will not work. If no value is passed then the value is blank, not NULL. Also, your further tests are not testing your variable - they are testing NULL. Try this:
-SET &UNIT_HDR=IF &UNIT_NO EQ '' THEN 'None Selected' ELSE
-IF &UNIT_NO EQ 'NULL' THEN 'POTATO VALU' ELSE &UNIT_NO ;


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
Francis,

Your default approach worked. I had a default statement written in the code too, but I was trying to evaluate against 'NULL'. I think I was creating conflicts by doing that. Appeared to me like it was ignoring the default value, which had me thinking that there was some special hidden value coming in. Anyway, using the '' was a much easier and simplier solution and the code snippet now works as desired. THANKS!

Darin, if user entered criteria of ALL in input box, I wanted the header to specifically reflect their choice of "ALL". That said, you are technically right. In a later line of code all three of these criteria ('', NULL, ALL) send NULL to the pipeline query.


7.6.4
XP SP3
EXL2K, HTML, PDF
 
Posts: 26 | Location: Ohio | Registered: April 13, 2009Report This Post
Member
posted Hide Post
Francis,

Thank you also for the tech guide tip. Sometimes, finding the help in the documentation is a challenge in and of itself. Smiler


7.6.4
XP SP3
EXL2K, HTML, PDF
 
Posts: 26 | Location: Ohio | Registered: April 13, 2009Report This Post
Expert
posted Hide Post
Don't forget
quote:
IS MISSING is incorrect syntax for Dialogue Manager. To determine the existence of a Dialogue Manager variable, use the EXIST suffix:

IF &UNIT_NO.EXIST EQ 0


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
i find it xplatform safer to say something like this:
-SET &myparmexist = &myparm.exist ;
-GOTO fix.&myparmexist ;
-fix.0
-SET &myparm = 'YOU FORGOT';
-fix.1




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report 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] Is it possible to evaluate for missing parameter in WF report?

Copyright © 1996-2020 Information Builders