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.
I've searched the forum and it seems like you require JavaScript to set a default date for a Calendar control.
I'm working with v7.7.03 - does any one know if this much-appreciated function is built in to the GUI?
I have a Date with Data type set to static and Date Range set to Relative with a range of five years. I can set a default date in the Selected Value by typing a date, but I'd like that to be a variable, which seems to me as more useful.
Any ideas? I guess I'll have to do it with JavaScript if this is not built-in.
Thanks,This message has been edited. Last edited by: Francis Mariani,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Have you tried using &PREV_BUS_DT directly in the HTML?
Apparently you can do that now ... at least that's what I found the hard way. I had some HTML attributes here and there in my HTML code for "styling" and when I run the form I could see a bunch of semicolons in my screen ... apparently the engine tried to resolve   to a variable (which was empty) leaving the ';' alone
Upgrading from 7.6.11 to 7.7.3 we found that date amper variables generated from the java calendar of an html launch are passed in DevStudio with slashes. 7.6.11 > &beg_date=20110621 7.7.3 > &beg_date=2011/06/21 The field on the launch page displays the date as '2011/06/21' in both versions but 7.7 actually loads the slashes into the &variable Has anyone else seen this? Is there a way to configure how the fex gets the variable?
8105 Tomcat and AIX reporting server input: Teradata, SQL, DB2, Essbase, Oracle, text output:html, excel, PDF,
I have. I even filed a bug report about it with IBI.
According to IBI, the behaviour in 7.6.11 is at fault. It has only behaved like that for a few hotfixes too.
The numeric format is much more convenient to work with for us, as our dates are stored in the database in the same fashion. Unfortunately for us, the rest of the world seems to have moved on :P
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Francis, I saw this old post you submitted. I like to do the same with previous date as well. However, when I place !IBI.AMP.PREV_BUS_DT; on the Selected Value section of HTML Composer I do not get the correct date. What I get is the text !IBI.AMP.PREV_BUS_DT; being displayed. I added your sample code to the fex as well. Any help you could provide would be appreciated.
In order to use !bang variables in your HTML, I believe your HTML page must be called from within a focexec via the -HTMLFORM command. If you are not using -HTMLFORM, you can populate your date input object either with a JavaScript function, or via a focexec that generates the date in XML format and is linked to the HTML date object as a dynamic, external source in HTML Composter.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Francis, I have the same issue with JOE. I put !IBI.AMP.PREV_BUS_DT; in the Selected Value for the calendar control. When I run HTML Composer, I just got that text !IBI.AMP.PREV_BUS_DT; in calendar box. Did I do wrong ? Here is my sample code:
-SET &ECHO=ALL;
-SET &PREV_BUS_DT= DATECVT(( DATEMOV((DATECVT(&YYMD,'I8YYMD','YYMD')),'PBD')),'YYMD','I8YYMD');
-SET &PREV_BUS_DT = EDIT(&PREV_BUS_DT ,'9999/99/99');
TABLE FILE SALE
PRINT
NAME
DATE
WHERE DATE LT '&PREV_BUS_DT';
END
This message has been edited. Last edited by: hainguyen,
I don't see an -HTMLFORM in your post, perhaps that's why it doesn't work for you?
I don't see the relevance of that TABLE request in there. Besides, if that's from passthru SQL, shouldn't you be putting that WHERE-clause in the SQL so that you don't fetch data that you do not need?
BTW, in your footer it says WebFOCUS 7.6 - which one? There have (unfortunately) been some major changes in 7.6 after 7.6.9, so it matters. If you're at the upper end of that version, you could also get your date in using Dan's suggestion.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
The best method to do this is to write an external procedure to load a hidden control with the date. Then take the date from the control and set the calendar control with that date. You can open a case up for this issue and we can find out were the problem is. Francis is correct that the fex must call the HTM page using HTMLFORM htmname... to pass the !IBI.AMP.AMPNAME; but the division does not like that approach.
Thanks Barry
WebFOCUS 8103, Windows, App Studio
Posts: 80 | Location: NYC | Registered: November 13, 2008
Sorry, this is just a sample code and I didn't check it again. I just changed it. I just get data from the normal table. My current version of WF now is 7.7.03. -HTMLFORM is confusing me. I am working on HTML Composer, I put Calendar control in this composer and just put !IBI.AMP.PREV_BUS_DT; in Selected Value textbox. If I add -HTMLFORM, where should I put this ?
-HTMLFORM is a dialog manager command, so you have to put it in a procedure/fex. The same one where those variables you intend to use are defined.
In HTML Composer, they'll still show up as !IBI.AMP.etc, as HTML Composer only opens the HTML and not the procedure.
I'm not sure what you changed about your sample procedure, but that TABLE request does not seem relevant to the issue you're trying to solve.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Thanks BarryS and Wep5622. This helps. I wish IBI can add this feature that let users select current date or dates relative to the current date for Selected Value in HTML Composer like what they did very awesome for letting users select Start date and End date. I think this is standard, better than just let users enter the static value in that Selected Value textbox.