Author Topic: Query Results as Default Value for Text Prompt  (Read 327 times)

Offline djl304

  • Associate
  • **
  • Join Date: Jan 2021
  • Posts: 2
  • Forum Citizenship: +0/-0
Query Results as Default Value for Text Prompt
« 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. 

Offline dougp

  • Statesman
  • ******
  • Join Date: Jul 2014
  • Posts: 631
  • Forum Citizenship: +23/-1
Re: Query Results as Default Value for Text Prompt
« Reply #1 on: 14 Jan 2021 10:18:28 am »
Why are you using a text box prompt and not a date prompt?

Offline djl304

  • Associate
  • **
  • Join Date: Jan 2021
  • Posts: 2
  • Forum Citizenship: +0/-0
Re: Query Results as Default Value for Text Prompt
« Reply #2 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. 

Offline dougp

  • Statesman
  • ******
  • Join Date: Jul 2014
  • Posts: 631
  • Forum Citizenship: +23/-1
Re: Query Results as Default Value for Text Prompt
« Reply #3 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.