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.
When you reference &YEAR later in your procedure, you would use &YEAR.EVAL
If year is not populated, it defaults to &DATEYY. Otherwise it uses the value of &YEAR that was supplied.This message has been edited. Last edited by: Darin Lee,
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I tried both of the above techniques. We're getting closer. The report output shows that it defaults to the current year, but the drop-down list in the parameters section of the output window still defaults to the first value, 2005. Eventually this report will have a launch page. Can something been done with the launch page so it will default to the current year?
Thanks,
John
WF 7.7.03, Windows 7, HTML, Excel, PDF
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006
This may work in a type statement, but NOT in auto prompt, where you will see the &DATEYY.EVAL appear in the select. Auto prompt does not evaluate &variables. The DEFAULT &variable only contains the value &DATEYY.EVAL, which is then evaluated in the type statement.This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I have tested this, exactly as I coded it, and the select should have CURRENT as the first value, with that value selected, and when the user submits the report, the value CURRENT is changed to 2007, or whatever the current year is.
If you mean a self service launch page, then you can do almost anything as you, not auto prompt, is in control. It really depends how you want to code the launch page, how much work WebFOCUS does and how much work javascript does.
I have submitted an article for Focal Point which covers this topic in quite a lot of detail.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
autoprompt strikes again!! Alan's suggestion looks the most promising as a quick fix. However, as he also suggests, creating a launch page for this changes the issue completely. I am assuming that you will also want the list of years to be a moving range, so you don't have do go back and edit it in 5 or ten years to add some more years. In which case you need some sort of a control other than a simple drop down box, or else some javascript to determine the values. In either case you can add "selected" in the
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Regarding the "moving range" (Darin 3/13/2007 11:52) in the calendar: movine dates (AKA: a date range) can be set when the variable is associated with the calendar control. This does not display a different date based on the system date which is part of this topic. However, the calendar control does allow for a dynamic date range.
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Actually, it can be used with a dynamic range based on the system date. If the control is set to a relative date (e.g. +/- 5 years) then it takes the system date and gives all dates within -5 to +5 years of the system date.
From the manual: Relative. This option allows the developer to set a specific number of days, months, and years relative to the current date. The current date (at run time) will always be the reference or starting point and the calendar will show a number of days, months, and years relative to the current date. The range could be all in the past (for example, five years prior to the current date) or all in the future (for example, five years in the future).
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
John, here's how we do this...its in our coding standards; in the fex:
-SET &somedate = whatever function you want;
-DEFAULT &STARTDATE = &somedate.EVAL ;
..then in the launch page 1) the variable for STARTDATE will say value="&somedate.EVAL" yuck. erase that! so it says value="" 2) initialize that value with a nice little piece of javascript, like this:
function setToday (){
var today = new Date();
var s1 = '';
var s2 = '';
if ((today.getMonth()-1) <10 ) s1='0';
if (today.getDate() < 10) s2='0';
thisday=s1+(today.getMonth()+1)+s2+today.getDate()+today.getFullYear();
document.nameForm.STARTDATE.value = thisday;
}
</SCRIPT>
make sure this goes into your BODY tag
onLoad=setToday();
If your launch page uses forms, change the word .nameForm to your form name. If your launch page doesn't use frames, then replace document.nameForm. with this.
I don't use ibi calendar. It won't launch on top of a small frameset. so from a design pov, its ng; I use a really really sweet calendar , you can find if you google 'javascript calendar tigra'; its totally customizable, colors placement, etc. Even works with European date formats...{somebody's gotta keep T and Frank happy } the .js method of seeding your startdate works with both/either/neither.
Just make sure your .js creates the same default start date as does your fex's dialog manager. Would be *nice* if they matched -S
the *other* way to do it is to select 'dynamic' in devstu for your date parameter. then select 'procedure' rather than masterfile. and write your own little fex that will run and produce the .xml file , where the first year in the list is always the current year. All the fex has to do is TABLE FILE ... PRINT FANCYDATE BY HIGHEST MYDATE ON TABLE PCHOLD FORMAT XML END ... and that's it. sweet. you can work out the bits to -WRITE a file with this year, last year, however many you want back. "MYDATE" here is the actual value you're passing; "FANCYDATE" is the value you're showing in the select box. Make sure the little fex is in the app path so the .htm can find it. I haven't tried forcing a SELECTED using this method, and i haven't tried putting the ALL option at the end of the list where i *want* it with this method. But i'm going to do that someday. (oh wow, i just realized that's how i could avoid the dreaded FOC_NONE mess! oh i'm so glad you asked this question) warning. devstu 766 is a hot mess, it doesn't chain, it doesn't pick displayvalues,This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003