I have writen a java script to pick the current Year in the Dropdown by default, but it throws the following error message.
I have set my the dropdown Object name as "XYZ" in "Miscellaneous Name".
Message: 'ff._oLstChoicesXYZ' is null or not an object
var ff= getFormWarpRequest();
var listDateFrom =ff._oLstChoicesXYZ
var Stryear =new Date().getFullYear();
This topic has been locked.
6 replies Latest Post - 2013-01-31T14:25:14Z by DanielWagemann
Pinned topic Prob in Selecting Current Year in Value Prompt (Dropdown)
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-31T14:25:14Z at 2013-01-31T14:25:14Z by DanielWagemann
Re: Prob in Selecting Current Year in Value Prompt (Dropdown)2013-01-30T18:16:23Z in response to HariPrashathAre you sure that setValue method is available for your value prompt? If not, you may need to traverse the prompt values with a for loop to see if the value is equal to your current year.
Re: Prob in Selecting Current Year in Value Prompt (Dropdown)2013-01-30T19:06:42Z in response to DanielWagemannThe following works for me in 10.1.1 using Internet Explorer. I had to -7 from the current date so it would jive with the sample data.
Re: Prob in Selecting Current Year in Value Prompt (Dropdown)2013-01-31T09:53:33Z in response to DanielWagemannDaniel,
Thanks for the Inputs, the code picks the correct value in the Dropdown but it again display the Prompt Page with Text item, where I have to enter the Year ID manually.
Your latest post mentions being prompted to type something in a text field. Unless you can clarify what it is you are looking for, I will not be able to help you further.
Re: Prob in Selecting Current Year in Value Prompt (Dropdown)2013-01-31T13:34:27Z in response to DanielWagemannDaniel,
Let me make it simple, my requirement is to run a report with default Prompt value - Current Year and Current Month.
To achieve this
• I created two value prompt (Dropdown) for Year and Month
• I have put the Java script to pick the Current Year and Current Month as default values.
but even after this, when I run the report it prompts to enter the Year and Month.
Kindly guide me on this
Re: Prob in Selecting Current Year in Value Prompt (Dropdown)2013-01-31T14:25:14Z in response to HariPrashathI wish you would have said that in the first place. All you are looking for is your report to run the first time with the month and year defaulted to the current date.
You will need to make the prompt object and filter optional.
Then you can change your filter to use a prompt macro with a default value. Something like:
where the MyCurrentYearCalc would be a query calculation with a definition of: