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] Dynamic date value in calendar - issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Dynamic date value in calendar - issue
 Login/Join
 
Member
posted
Hi Team,

I tried to create / set a dynamic date value in calendar using prompt. But it is not taking up. Can you help me out? Below is the code


-SET &STARTDATE_YYMD = DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'), 'M', '-1'), 'YYMD', 'I8YYMD');
-SET &STARTDATE_MONTH = LCWORD(10, CHGDAT('YYMD','MX', &STARTDATE_YYMD, 'A10'), 'A10');
-SET &STARTDATE_DAY = CHGDAT('YYMD','DX', &STARTDATE_YYMD, 'A2');
-SET &STARTDATE_YEAR = CHGDAT('YYMD','YYX', &STARTDATE_YYMD, 'A4');
-SET &STDT = TRUNCATE(&STARTDATE_MONTH) | ' ' | TRUNCATE(&STARTDATE_DAY) | ' ' | TRUNCATE(&STARTDATE_YEAR);

-SET &ENDDATE_YYMD = DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'), 'D', '0'), 'YYMD', 'I8YYMD');
-SET &ENDDATE_MONTH = LCWORD(10, CHGDAT('YYMD','MX', &ENDDATE_YYMD, 'A10'), 'A10');
-SET &ENDDATE_DAY = CHGDAT('YYMD','DX', &ENDDATE_YYMD, 'A2');
-SET &ENDDATE_YEAR = CHGDAT('YYMD','YYX', &ENDDATE_YYMD, 'A4');
-SET &ENDDT = TRUNCATE(&ENDDATE_MONTH) | ' ' | TRUNCATE(&ENDDATE_DAY) | ' ' | TRUNCATE(&ENDDATE_YEAR);

-TYPE STARTDATE_YYMD &STARTDATE_YYMD
-TYPE STARTDATE_MONTH &STARTDATE_MONTH
-TYPE STARTDATE_DAY &STARTDATE_DAY
-TYPE STARTDATE_YEAR &STARTDATE_YEAR
-TYPE STDT &STDT

-TYPE ENDDATE_YYMD &ENDDATE_YYMD
-TYPE ENDDATE_MONTH &ENDDATE_MONTH
-TYPE ENDDATE_DAY &ENDDATE_DAY
-TYPE ENDDATE_YEAR &ENDDATE_YEAR
-TYPE ENDDT &ENDDT

-*-DEFAULT &STARTDATE='March 18 2018';
-*-DEFAULT &ENDDATE='April 17 2019';
-DEFAULT &STARTDATE = '&STDT.EVAL';
-DEFAULT &ENDDATE = '&ENDDT.EVAL';
PROMPT &STARTDATE.(|FORMAT=MDYY).StartDate:.QUOTEDSTRING;
-PROMPT &ENDDATE.(|FORMAT=MDYY).EndDate:.QUOTEDSTRING;


When you provide as a static value it is working however for dynamic it is not showing the value which calculated.

Below is the reference URL:
https://webfocusinfocenter.inf...source/resp_auto.htm

Calendar Control
The calendar control will display for parameters that are simple filters for a field that is a combination of YYMD date format with any of the supported modifiers. The date format must have all components (year, month, day). Date-Time field formats are not supported.

Responsive Autoprompt calendar control with default date
Note:

he default value is the current date.
The default value can be specified with an English month, two-digit day, and four-digit year. For example:
-DEFAULT &STARTDATE='January 01 2016';

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


WebFOCUS 8.6
Windows, All Outputs
 
Posts: 9 | Registered: September 25, 2014Report This Post
Expert
posted Hide Post
Do a search on "DEFAULT DYNAMIC VALUE" and you wil find that this has been discussed (many times) before.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Hi Tony,
Thanks for the information. I could not find the solution for my query.

I want the date column to be displayed as a Calendar control.

Can you provide the exact URL ?
Thanks in advance.


WebFOCUS 8.6
Windows, All Outputs
 
Posts: 9 | Registered: September 25, 2014Report This Post
Virtuoso
posted Hide Post
subbu

In 8.2.06 when you are creating the html page with App Studio if you click on the calendar control and choose the settings tab, select Dynamic / Other and there is a check box for current start date. Select that and it will make that the default date when the page is run.


Thank you for using Focal Point!

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

I am trying to populate or design the calendar control in Page Designer using PROMPT with dynamic values.
For that I am using the code (in my initial thread) to create dynamic date values.

When we provide the static value as below it is showing the correct values in Calendar control
-DEFAULT &STARTDATE='March 18 2018';

However, when I calculate the same dynamically using WebFOCUS SET command, it is populating the current date.

For the default set of date value in PROMPT to create a calendar control I refer the below URL.

Below is the reference URL:
https://webfocusinfocenter.inf...d9-9726-FC3291EDC48F

Kindly let me know if any queries.

Thanks
Subbu


WebFOCUS 8.6
Windows, All Outputs
 
Posts: 9 | Registered: September 25, 2014Report This Post
Member
posted Hide Post
quote:
Originally posted by subbu_088:
Hi Chuck,

I am trying to populate or design the calendar control in Page Designer using PROMPT with dynamic values.
For that I am using the code (in my initial thread) to create dynamic date values.

When we provide the static value as below it is showing the correct values in Calendar control
-DEFAULT &STARTDATE='March 18 2018';

However, when I calculate the same dynamically using WebFOCUS SET command, it is populating the current date.

For the default set of date value in PROMPT to create a calendar control I refer the below URL.

Below is the reference URL:
https://webfocusinfocenter.inf...source/resp_auto.htm


Calendar Control
The calendar control will display for parameters that are simple filters for a field that is a combination of YYMD date format with any of the supported modifiers. The date format must have all components (year, month, day). Date-Time field formats are not supported.

Responsive Autoprompt calendar control with default date
Note:

The default value is the current date.
The default value can be specified with an English month, two-digit day, and four-digit year. For example:
-DEFAULT &STARTDATE='January 01 2016';

Kindly let me know if any queries.

Thanks
Subbu


WebFOCUS 8.6
Windows, All Outputs
 
Posts: 9 | Registered: September 25, 2014Report This Post
Platinum Member
posted Hide Post
The link below is a post that describes how to get Designer to do the prompting. The last entry by Michele Brady has two other links with more information.

Default Parameters - Variables and Constants


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report 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] Dynamic date value in calendar - issue

Copyright © 1996-2020 Information Builders