COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: djl304 on 14 Jan 2021 07:23:09 AM

Title: Query Results as Default Value for Text Prompt
Post by: djl304 on 14 Jan 2021 07:23:09 AM
I have a query that runs after my prompt page that displays a page based on inputs from the user (different client types will show different landing pages).  From there, the user can change dates, select specific reports to display, etc.  On this page are text box prompts for the dates in the format YYYY-MM-DD.  Right now these dates are manually updated monthly with the appropriate start and end default dates (we default these dates based on the client type).

What I can't figure out is how to take the results from the first query and use those as the default selections in the text box prompts.  The start and end dates that come back from the query are actual dates (so right now they display Dec 1, 2019 and Nov 30, 2020 for my start and end dates), and I need the prompts to display 2019-12-01 and 2020-11-30. 
Title: Re: Query Results as Default Value for Text Prompt
Post by: dougp on 14 Jan 2021 10:18:28 AM
Why are you using a text box prompt and not a date prompt?
Title: Re: Query Results as Default Value for Text Prompt
Post by: djl304 on 14 Jan 2021 03:05:59 PM
I can definitely change the prompt to a date prompt - I'm using COGNOS to replace an existing self service tool, and our end users are used to typing in the date. 
Title: Re: Query Results as Default Value for Text Prompt
Post by: dougp on 14 Jan 2021 07:01:27 PM
If you use the "edit box" GUI for the date prompt, they can still type.  It will accept most valid date format strings.