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     [CLOSED] -DEFAULT DYNAMIC VALUES

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] -DEFAULT DYNAMIC VALUES
 Login/Join
 
Gold member
posted
It appears that you cannot set a -DEFAULT value to an amper-variable.

-DEFAULT &START_DATE = &STARTDATE

The auto-prompt displays &STARTDATE. Anybody have a workaround. The .EVAL also does not work.

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


WebFOCUS 8

Windows, All Outputs
 
Posts: 55 | Location: Phoenix | Registered: March 01, 2018Report This Post
Virtuoso
posted Hide Post
What's the value of &STARTDATE? You're setting an & with another &.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
TRUE: "It appears that you cannot set a -DEFAULT value to an amper-variable."

There are work-arounds...

This message has been edited. Last edited by: Doug,
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
It really doesn't matter what the value is but if I do..

-SET &START_DATE = 06082018 ;
-DEFAULT &STARTDATE = &START_DATE

The auto-prompt displays &START_DATE


WebFOCUS 8

Windows, All Outputs
 
Posts: 55 | Location: Phoenix | Registered: March 01, 2018Report This Post
Virtuoso
posted Hide Post
I think if you don't want the variable to prompt you have to use -DEFAULTH for hidden like this:

-SET &ECHO=ALL;
-SET &START_DATE = 06082018;
-DEFAULTH &STARTDATE = &START_DATE.EVAL;  


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Gold member
posted Hide Post
I want it to auto-prompt.

What I have is a -INCLUDE that sets the default start date to the previous 28 days. This works for my HTML pages but the focexecs that the users create themselves who do not use HTML pages, I don't want them to have to enter the dates every time if they don't need to change those values.


WebFOCUS 8

Windows, All Outputs
 
Posts: 55 | Location: Phoenix | Registered: March 01, 2018Report This Post
Expert
posted Hide Post
Les,
Maybe this will work:
 
-SET &DATE_LESS_28 = DATECVT((DATEADD((DATECVT (&YYMD, 'I8YYMD', 'YYMD')),'D',  -28)), 'YYMD','I8YYMD');
-SET &DATE_LESS_28 = EDIT(&DATE_LESS_28,'$$$$99/99/') || EDIT(&DATE_LESS_28,'9999');
-DEFAULTS &STARTDATE = &DATE_LESS_28.EVAL
-TYPE &STARTDATE


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
I do that -DM commands in INCLUDE and the TYPE command shows the correct value but it's the auto-prompt value that's the issue. It displays the literal variable name and not the value.


WebFOCUS 8

Windows, All Outputs
 
Posts: 55 | Location: Phoenix | Registered: March 01, 2018Report This Post
Expert
posted Hide Post
What's the properties of the "Prompt For Parameters" on the fex (Yes or No)?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Bear in mind the order of execution: Autoprompt is triggered by a static analysis (pre-scan) of the code, before any lines (whether DM of FOCUS) in the fex are executed. At that point, none of the amper vars have actually been instantiated. In shore, Autoprompt can only assemble prompting text based on the static content of the fex file.

To overcome that you'd have to generate fex code dynamically, in which the computed values are hardcoded in the -DEFAULT statements, and then (after a -RUN) EX or -INCLUDE it (in a manner that gets by the client-side pre-scan). But I'd hestiate to venture out on that limb in a production application.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 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     [CLOSED] -DEFAULT DYNAMIC VALUES

Copyright © 1996-2020 Information Builders