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] Force a PROMPT or Set -DEFAULT to a Variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Force a PROMPT or Set -DEFAULT to a Variable
 Login/Join
 
Gold member
posted
I would like to set a parameter to a value that is stored in another parameter and still prompt for that parameter. For instance I want to ask the user what fiscal year they would like to view, but already have the field populated with the current fiscal year.

And I would like to do it with out having to create an HTML launch page.

Here is what I think should work:

-SET &Fiscal_Year_Prompt=&Fiscal_Year_Calculated_Already;
-PROMPT '&Fiscal_Year_Prompt.Enter the fiscal year.';

The fex seems to ignore the -PROMPT command because the value of that parameter is already set.

I cannot manage to use -DEFAULT either. The fex will not evaluate the parameter I am trying to default it to:
-DEFAULT &Fiscal_Year_Prompt='&Fiscal_Year_Calculated_Already';
When running the fex it prompts for &Fiscal_Year_Prompt but the default value is literally these characters: '&Fiscal_Year_Calculated_Already' rather than the value of that field.

I have also tried:
-DEFAULT &Fiscal_Year_Prompt='&Fiscal_Year_Calculated_Already.EVAL';
-RUN

This message has been edited. Last edited by: Kevin Patterson,


Kevin Patterson
Appalachian State University
WebFOCUS 7.7.03
Windows, All Outputs
 
Posts: 57 | Registered: February 29, 2012Report This Post
Expert
posted Hide Post
This looks like a case for a "launch page" / user input screen / HTMLFORM... Or, it can be done in InfoAssist with a dynamic source... Or... several other options. But -DEFAULTing to a variable isn't going to work...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Autoprompt has limited functionality. Your default value is the first on the list. If you -DEFAULT the &variable you won't even get autoprompted for it anymore.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Gold member
posted Hide Post
Ohhhhkay. I'll use a launch page. Roll Eyes

Thanks for the confirmation that I wasn't just messing it up.


Kevin Patterson
Appalachian State University
WebFOCUS 7.7.03
Windows, All Outputs
 
Posts: 57 | Registered: February 29, 2012Report This Post
Platinum Member
posted Hide Post
Hey Kevin,

I know you closed this, but it looked like you needed to simply remove your quotation marks and then you will get the actual value of the variable and not just the variable name --
-DEFAULT &XX = &OTHERVARIABLE ;


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
Master
posted Hide Post
To further expand on Vivian's post, here's a working example:

-SET &COUNTRY_ALREADY='ENGLAND';
-DEFAULT &COUNTRY=&COUNTRY_ALREADY.EVAL;

TABLE FILE IBISAMP/CAR
BY  CAR.ORIGIN.COUNTRY
BY  CAR.COMP.CAR
BY  CAR.CARREC.MODEL
WHERE CAR.ORIGIN.COUNTRY EQ '&COUNTRY';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END
-RUN


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Virtuoso
posted Hide Post
I believe he wants to set the value but still get prompted for &COUNTRY. That won't happen with this example.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
quote:
Originally posted by BabakNYC:
I believe he wants to set the value but still get prompted for &COUNTRY. That won't happen with this example.


Correct. But it might still be useful somehow for him or others reading this thread in the future.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Expert
posted Hide Post
I stand corrected... Try this:
-SET &COUNTRY_ALREADY='ENGLAND';
-DEFAULT &COUNTRY=&COUNTRY_ALREADY.EVAL;
TABLE FILE IBISAMP/CAR
BY  CAR.ORIGIN.COUNTRY
BY  CAR.COMP.CAR
BY  CAR.CARREC.MODEL
WHERE CAR.ORIGIN.COUNTRY EQ '&COUNTRY';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,$
ENDSTYLE
END
-RUN
Smiler Doug

This message has been edited. Last edited by: Doug,
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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] Force a PROMPT or Set -DEFAULT to a Variable

Copyright © 1996-2020 Information Builders