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.
Right now I have a check register report that prompts for a parameter called CDATE.
The Date is entered like this "2008/01/13" into a text box. The date must match the check run date exactly. This is fine for our internal users as they know the format and the date of the last check run.
We are now wanting to put this report the web. The web users will not know the format or the check run date.
I would like to present them with two pulldown menus:
-= Select Year =- 2008 2009 2010 All
-=Select Month=- Jan Feb Mar Apr May etc ALL
I would like to chain these together so if they choose ALL in the year field, the month param is disabled.
It needs to be able to pass a * for the day always, and a * for the month is one is not chosen.
Is this possible? Can I break a date param in to two pulldowns and pass a * ?This message has been edited. Last edited by: Kerry,
prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL
The web users will not know the format or the check run date
Any reason why you would not tell them (in a small addition to the prompt perhaps) what the format of the variable should be? By doing that you would not have to split the variables up.
quote:
Can I break a date param in to two pulldowns and pass a * ?
The simple answer to this is Yes, we can. The more complex answer depends on how you want to get the value from the user (ie. using autoprompt or using html composer or using a self made html file, or ...)
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
The web users will not know the format or the check run date
Any reason why you would not tell them (in a small addition to the prompt perhaps) what the format of the variable should be? By doing that you would not have to split the variables up.
quote:
Can I break a date param in to two pulldowns and pass a * ?
The simple answer to this is Yes, we can. The more complex answer depends on how you want to get the value from the user (ie. using autoprompt or using html composer or using a self made html file, or ...)
Right now if you enter a day that there was not check run you get the standard no html output error. We want to offer our web users just year and month. They can choose 2009 - Jan and see the 4 runs for that month. Or 2009 - All and see the runs for the entire year.
The report was made with the report painter in developer studio. I just did a right click publish. I can then edit and add the pulldown/javascript or whatever else in Dreamweaver.
If I use the HTML composer the report will require a password to run.
I just want to add the pulldowns to make it more user friendly.This message has been edited. Last edited by: Greg,
prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL
Please check your PM inbox for an important message from Kerry
To whet your appetite, here is a piece of JavaScript that I put together a while ago for validating date inputs. It validates to the format DD/MM/YYYY as it was for a UK application, but with care you should be able to refine it for your purposes.
function validate_date(ctrl) {
var Array_days_in_month = new Array(0,31,29,31,30,31,30,31,31,30,31,30,31);
this.dateObj = document.getElementById(ctrl);
chkdate = this.dateObj.value;
// alert("Checking date for "+ctrl+" - "+chkdate)
if (chkdate != null && chkdate != '') {
if (!chkdate.match(/^[0-3]{1}[0-9]{1}[/]{1}[0-1]{1}[0-9]{1}[/]{1}[0-9]{4}$/)) {
alert("The date MUST be in dd/mm/yyyy format\nand a valid date.\n\nYou entered - "+chkdate);
this.dateObj.focus();
this.dateObj.select();
return false;
} else {
// The date is valid in format but is it a valid date?
// Split the date components to validate days in month and month number
chk_days = chkdate.substring(0,2) * 1;
chk_mnth = chkdate.substring(3,5) * 1;
chk_year = chkdate.substring(6,10) * 1;
days_in_mnth = Array_days_in_month[chk_mnth];
// alert("Days - "+chk_days+"\nMonth - "+chk_mnth+" - "+days_in_mnth+"\nYear - "+chk_year);
if (chk_mnth < 1 || chk_mnth > 12 || chk_days < 0 || chk_days > days_in_mnth || days_in_mnth == null || days_in_mnth == " ") {
alert("Format OK, but the date MUST be valid.\n\nYou entered - "+chkdate);
this.dateObj.focus();
this.dateObj.select();
return false;
}
}
}
}
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, 2004
We want to offer our web users just year and month. They can choose 2009 - Jan and see the 4 runs for that month. Or 2009 - All and see the runs for the entire year.
But then you would have to re-structure your request, because you can't do an equal test anymore. You would have to code a from-to or ge and le where. And indicate in the request which date it concerns, or first create an overview of all available dates with a drilldown and then when the drilldown is clicked show the detail report for the selected date. It can be done of course, but one thing is easier then the other. And I can't make that decision for you. I'll see if I can come up with something.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I like the drill down Idea. Because I can make a request with the cdate param blank and get all the runs since 2008 when our finance system went online.
prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL