my solution with the "-1" value does not work with date prompts. Only value or text prompts are supported unfortunately. I know that there are solutions with java script out there that support the Cognos date prompt item.
Original Message:
Sent: Thu July 27, 2023 10:12 AM
From: Elizabeth Johnson
Subject: Changing the Default Value on a Date Prompt to 'Yesterday'
I was able to follow these steps, but I am still have issues with the default selections option for a date prompt. I am not able to specify the '-1' value. I am still only allowed to pick a specific date. I am having the same issue on Cognos 11.1.7.

------------------------------
Elizabeth Johnson
Original Message:
Sent: Sat July 22, 2023 06:47 AM
From: Robert Dostal
Subject: Changing the Default Value on a Date Prompt to 'Yesterday'
Hi Elizabeth,
which version of Cognos Analytics do you use? If it's V12, then there's a new feature for dynamic default values for prompts.

If you don't use V12, then you might have to tweak around the data values to get a dynamic parameter value. I usually do that by setting the data value to a distinct value that will never come from the data source (like "-1") and set this as default value in the prompt. In the query for the prompt, I then use an if-statement to replace the real data value with "-1" if it's the desired default value. Haven't tried that with date prompts a I use drop-down or checkbox prompts.
You can find some more explanations here:
https://community.ibm.com/community/user/businessanalytics/discussion/default-selection-in-value-prompt-is-first-value
------------------------------
Robert Dostal
Team Leader BI
GEMÜ
Ingelfingen
Original Message:
Sent: Fri July 21, 2023 02:23 PM
From: Elizabeth Johnson
Subject: Changing the Default Value on a Date Prompt to 'Yesterday'
Does anyone know a way to set a dynamic value for the default selection for a 'Date Prompt' that does not include using an HTML item? I am not seeing the option to add a static choice in the properties pane. When I go to select a default value, it wants me to pick a date from a calendar instead of a blank text box where I could specify a dynamic value to represent yesterday.
Thanks in advance,
------------------------------
Elizabeth Johnson
------------------------------