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     2nd Calendar cntrl populate only next 30 days, from date choose in 1st Cal control

Read-Only Read-Only Topic
Go
Search
Notify
Tools
2nd Calendar cntrl populate only next 30 days, from date choose in 1st Cal control
 Login/Join
 
Guru
posted
Hi All,

I've 2 Calendar controls in my HTML page.

If i select the date July 28,2013 in the 1st Calendar control and second calendar control should populate with the dates from July 28,2013 to Aug 28,2013.(only 30 Days enabled). Other dates must be disabled in the 2nd Calendar control.

I've tried something like below:

-DEFAULT &CAL = '';-*Parameter name for 1st Calendar control
-IF &CAL EQ 'FOC_NONE' THEN GOTO LB1;
TABLE FILE EMPLOYEE
PRINT FIRST_NAME NOPRINT
COMPUTE DATE_PLUS_THIRTY/YYMD = DATEADD('&CAL','D',30);
END
-LB1
-EXIT 


How to pass the resulting variable to 2nd Calendar control and enable only 30 days from the date i've chosen in 1st Calendar Control in HTML Composer?

I don't have idea in JS. Confused

Please help me on this.

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
Have you tried chaining them?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Yea, chaining with the calendar controls kind of sucks. I believe you will need to use a hidden text box as a middle man and then chain that value to the fex populating the second calendar control (unfortunately having a calendar control populated by an external procedure only works in IE as far as I can remember which means users will either have to use IE or IE tab in chrome or firefox for that to work.

If anyone has a workaround for that I'm all ears.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Guru
posted Hide Post
Thanks j.gross and J for your reply,

Perhaps, I chained them.

Uploaded my image.
http://tinypic.com/view.php?pic=15ds3m0&s=5

If i pass a date from hidden text box to 2nd calendar control, is it possible that when i click on 2nd calendar in the output, only desired 30 days are enabled?

This message has been edited. Last edited by: Rifaz,


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Guru
posted Hide Post
Oh yea... you can pass the selected date and have a range from that date...


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Guru
posted Hide Post
Hi,

First, i tried using TEXT and CALENDAR control as you suggested.

CAL.fex
-------
TABLE FILE EMPLOYEE
PRINT FIRST_NAME NOPRINT
COMPUTE DATEHIRED/YYMD = HIRE_DATE;
COMPUTE DATE_PLUS_THIRTY/YYMD = DATEADD(DATEHIRED,'D',30);
ON TABLE PCHOLD FORMAT XML
END  



In EDIT, associate CAL.fex and DATEHIRED as your display value.In CALENDAR,associate CAL.fex and DATE_PLUS_THIRTY as your display value.Chain them, resolving parameter is DATEHIRED.
As expected, only 30 date values are enabled initially.But, supplying manually other dates in TEXT, results no change in CALENDAR.

Correct me, if i'm wrong?

So, i tried in another method, by declaring PARAMETER(&CAL) in EDIT and in resolves parameter including the same.

Please find the image in detail.
http://tinypic.com/r/20ubtig/5

In my HTML file, i've
---------------------
var varNamePassed= "!IBI.AMP.&CAL;";
function onInitialUpdate()
{
document.getElementIdBy('edit1').value = varNamePassed;
}  


In my TEXT control
----------------
-DEFAULT &CAL = '';
-IF &CAL EQ 'FOC_NONE' THEN GOTO LB1;
TABLE FILE EMPLOYEE
PRINT FIRST_NAME NOPRINT
COMPUTE DATEHIRED/YYMD = HIRE_DATE;
ON TABLE PCHOLD FORMAT XML
END
-LB1
-EXIT  


In my CALENDAR control, i've
--------------------------
-DEFAULT &CAL = '';
TABLE FILE EMPLOYEE
PRINT FIRST_NAME NOPRINT
COMPUTE DATEHIRED/YYMD = HIRE_DATE;
COMPUTE DATE_PLUS_THIRTY/YYMD = DATEADD('&CAL','D',30);
ON TABLE PCHOLD FORMAT XML
END 


Apologies, if it doesn't makes sense.

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report 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     2nd Calendar cntrl populate only next 30 days, from date choose in 1st Cal control

Copyright © 1996-2020 Information Builders