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]Calendar Default Date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Calendar Default Date
 Login/Join
 
Silver Member
posted
Hi,

I created a calendar control in my HTML and had set its date forrmat to "trMYY". Now i try to set a default value to the calandar through IBI.AMP variable and pass the value from a fex. Irrespective of what ever format i set my local variable (using CHGDAT or DATECVT) it always displays in YYMD format in the HTML. I want the default date to be displayed as trMYY and it has to be a valid date (not a string) because this value will be passed to the backend when the form is submited. I have not tried JS yet, before that i would like to know if this is something tat can be accomplished through FEX.



The default value i used in HTML form is 

!IBI.AMP.CURRENT_DT;



The fex used to call the html looks like this

-SET &CURRENT_DT = &YYMD.EVAL;
-HTMLFORM client_revenue_detail.htm


This message has been edited. Last edited by: Saravanan J,


Release : 7.7.02
OS : Linux
App Server : Tomcat
all output
 
Posts: 36 | Registered: February 03, 2011Report This Post
Expert
posted Hide Post
You are setting &CURRENT_DT to &YYMD, What is the defined format of the calendar control ?

What happens if you set &CURRENT_DT to a valid trMYY date ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Try something like this for creating your calendar default value:

-SET &CUR_YYM   = EDIT(&YYMD,'999999$$');
-SET &RPT_MTHYY = LCWORD(14,CHGDAT('A6YYM','MXYY',&CUR_YYM,'A14'),'A14');
-SET &RPT_MONTH = GETTOK(&RPT_MTHYY,&RPT_MTHYY.LENGTH,1,' ',9,'A9') || ',&|nbsp;' ||
-                 GETTOK(&RPT_MTHYY,&RPT_MTHYY.LENGTH,2,' ',4,'A4');


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Silver Member
posted Hide Post
Thanks much Dan, your code works perfect. It also points the calendar to the default date on initial load. I had problem with using the
 &|nbsp; 
. It throws js script error, so i removed it. Is there a workaround for that? Even otherwise i am good without the space between month and year.


Waz, -SET does not allow me to set the type of the date. When i tried setting the value like
-SET &CURRENT_DT = 'September, 2011';

the calander did not recognize it as a date.


Release : 7.7.02
OS : Linux
App Server : Tomcat
all output
 
Posts: 36 | Registered: February 03, 2011Report This Post
Expert
posted Hide Post
quote:
-SET &CURRENT_DT = 'September, 2011';
is more of a STRING, not a DATE (has no day number).
 
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]Calendar Default Date

Copyright © 1996-2020 Information Builders