Author Topic: Default dynamic values for date prompt  (Read 100 times)

Offline chr.93

  • Full Member
  • ***
  • Join Date: Feb 2020
  • Posts: 14
  • Forum Citizenship: +0/-0
Default dynamic values for date prompt
« on: 31 Mar 2020 04:15:24 am »
Hello to all

I have a date range prompt and I have a request to have default values from the first day of the current month to the day before the current day.
Is there a way to achieve that?

Offline BigChris

  • Statesman
  • ******
  • Join Date: Apr 2013
  • Posts: 1,206
  • Forum Citizenship: +86/-0
Re: Default dynamic values for date prompt
« Reply #1 on: 31 Mar 2020 05:14:05 am »
This might not be the best way to do it, but it works for me:

http://cognostips.weebly.com/blog/date-prompts

Offline chr.93

  • Full Member
  • ***
  • Join Date: Feb 2020
  • Posts: 14
  • Forum Citizenship: +0/-0
Re: Default dynamic values for date prompt
« Reply #2 on: 31 Mar 2020 06:21:58 am »
This might not be the best way to do it, but it works for me:

http://cognostips.weebly.com/blog/date-prompts

ok , i get that but this requires to add another prompt. They don't want that. :-\

Offline BigChris

  • Statesman
  • ******
  • Join Date: Apr 2013
  • Posts: 1,206
  • Forum Citizenship: +86/-0
Re: Default dynamic values for date prompt
« Reply #3 on: 31 Mar 2020 07:39:55 am »
You're probably looking at JavaScript to interact with the Prompt API then

Offline chr.93

  • Full Member
  • ***
  • Join Date: Feb 2020
  • Posts: 14
  • Forum Citizenship: +0/-0
Re: Default dynamic values for date prompt
« Reply #4 on: 01 Apr 2020 10:06:58 am »
You're probably looking at JavaScript to interact with the Prompt API then

Do you have a JavaScript like that? I have found one but i can't seem to be able to make it work in Cognos 11

Offline BigChris

  • Statesman
  • ******
  • Join Date: Apr 2013
  • Posts: 1,206
  • Forum Citizenship: +86/-0
Re: Default dynamic values for date prompt
« Reply #5 on: 02 Apr 2020 01:56:43 am »
Nope - I toyed with the idea for a little while, but I don't have any JaveScript knowledge so I wouldn't be able to support it if it went wrong.

Give 'em the extra prompt and tell 'em to suck it up  ;D

 


       
Twittear