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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Optional Parameters
 Login/Join
 
Member
posted
I am creating a report in Dev Studio where the user will have several parameters to enter. If they do not enter a particular parameter, I want to return all rows for that column. If a value is entered for that parameter, then return only those rows that match the value entered. It seems that this should be a simple task to accomplish, but cannot figure it out. Help would be appreciated.
 
Posts: 26 | Location: Little Rock, AR | Registered: October 29, 2004Report This Post
Member
posted Hide Post
We would use Dialogue Manager commands for this.

You can code (edit source) a -IF statement that checks the value of the parameter. If the parameter is blank, then goto a statement label after the WHERE.

Here's a quick example:
TABLE FILE CAR
PRINT CAR
BY COUNTRY
-IF &CNTRY EQ '' GOTO BYP1;
WHERE (COUNTRY EQ '&CNTRY');
-BYP1
END

Hope it helps.
Deb
 
Posts: 29 | Location: Ravenna, OH | Registered: December 10, 2003Report This Post
Member
posted Hide Post
Thanks Deb! I'll give this a try. I'm still fairly new to FOCUS/WebFOCUS and have never used statement labels before.

Annette
 
Posts: 26 | Location: Little Rock, AR | Registered: October 29, 2004Report This Post
Master
posted Hide Post
awbradley,

A special keyword FOC_NONE has been added to the FOCUS language that if returned to the reporting engine will bybass the parameter and return all values for that field.

When you add the ALL option to your dynamic parameter in the Layout Painter, this is the value that is returned to the server when ALL is chosen.

To use it in a parameter that a user type do something like this. the parameter name is COUNTRY for the example below.


-SET &COUNTRY = IF &COUNTRY.EVAL EQ '' THEN 'FOC_NONE' ELSE '&COUNTRY';
-RUN
TABLE FILE CAR
PRINT COUNTRY CAR MODEL DEALER_COST
WHERE COUNTRY EQ &COUNTRY;
END
Give this a try.

This message has been edited. Last edited by: <Maryellen>,




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
You could just make &CNTRY = '$*' if they don't select the value. '$*' is the wildcard for alpha fields. It will select COUNTRY equal to anything.

That way you don't have to add the dialog manager statements.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Member
posted Hide Post
Thanks to everyone for all the great suggestions. This has been a huge help.

Annette
 
Posts: 26 | Location: Little Rock, AR | Registered: October 29, 2004Report This Post
Expert
posted Hide Post
FOC_NONE...that's cool. i vaguely remember taking notes on that at summit. Thanks for the reminder, Texas.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders