Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS Designer Forum on Focal Point     [CLOSED] Default Parameters - Variables & Constants
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Default Parameters - Variables & Constants
 Login/Join
 
Member
posted
Is it possible to have a default parameter value be a variable?

Example being that when the designer is run, the parameter for date field will default to today's date?

There is a section for default parameter in the designer but looks like it would have to be set to a constant.

Any insight would be appreciated!

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


8.2.02M
 
Posts: 4 | Registered: March 21, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Ryan

Can you provide a little more detail. Are you creating a workbook, chart, page or portal in the designer. Are you refrencing a fex that has a WHERE on the date?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1694 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Member
posted Hide Post
Building a page, there is a WHERE in the fex that is an optional multiselect parameter. So the default date value is ALL but would like it to always reference the current day.


8.2.02M
 
Posts: 4 | Registered: March 21, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Ryanj

I have asked product management to look at this and they will be providing some guidance.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1694 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Member
posted Hide Post
Hi Ryanj,

You are correct that Page Designer filters do not take amper variables as filter values, since behavior is the same as autoprompt. If you do not set a default value or try to use an amper variable as the –DEFAULT, and the filter uses a FROM… TO relationship, the default in the control will be the current date. If the filter uses another relationship, such as EQ, GE, or LE, then the resulting control is a drop-down list, and the default is the first value in the list.
When a procedure creates a drop-down control in autoprompt and Page Designer, you can use a global variable to set the default, which is included in this topic: https://kb.informationbuilders...rols-8205-and-higher There is also a video that you can use as reference, https://webfocusinfocenter.inf...nalized_Defaults.mp4.
In addition, I’m including a simplified example that reflects what you are trying to do below. If you have any questions or would like to connect, just let us know.

The first step is to set up a very simple FOCEXEC to set the global variable. For example, you can use the following to set the global variable to be the current date:
-SET &&TIME_DATE = &YYMD;
-DONE
If you wanted to get fancy, you could set additional variables to customize the date further. The following example uses a function to set the value of the global variable to be a week from today:
-SET &CURDATE = &YYMD;
-SET &&TIME_DATE = AYMD(&CURDATE, 7, 'YYMD');
-DONE
Next, the path of this FOCEXEC, which you can get from the Properties panel on the Home Page, would need to be added to the Paths to be executed on user Sign-in property in the Administration Console, on the Other page.
Finally, add content that has a dynamic parameter for Sale Date to a page. You should be prompted to add a filter. Once added, select the filter control and open the Properties panel. On the Settings tab, in the Data Settings area, set the Default value to the name of your global variable (for example, &&TIME_DATE). Save the page, then sign out of WebFOCUS and sign back in again to run the FOCEXEC to set the global variable. When you run the page, the default value should be the one you set.


Director, Technical Content Support Services
 
Posts: 25 | Registered: August 03, 2018Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS Designer Forum on Focal Point     [CLOSED] Default Parameters - Variables & Constants

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.