Skip to Content

How to create @ Prompt with Today and Previous day as default values in IDT.

Hi,

I want to create an @prompt on date filed with Today's as default value for TO date and Yesterday's date as default value for FROM date in IDT.

Could you please guide me how can I create this prompt condition in IDT by using the Vertica database.

Thanks in advance.

--

Regards,

Krishna Reddy.

.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2015 at 09:57 AM

    Hi Krishna,

    It is not possible to pass Dynamic Value in List of value. You can pass only Static value in universe.

    Their is another solution for this kind of requirement. First you will need to define Prompt which contains a Custom List of values and then user Decode function Example:

    to_char(#Database Column),'YYYYMMDD') >= Decode(@Prompt('Enter Date YYYYMMDD format:', 'A', {'Current Date', 'Prior Date', 'Prior Week Date'},mono,free,,{'Current Date'},User:10), 'Current Date', to_char(trunc(sysdate),'YYYYMMDD'), 'Prior Date', to_char(trunc(sysdate-1),'YYYYMMDD'), 'Prior Week Date', to_char(trunc(sysdate-7),'YYYYMMDD'),@Prompt('Enter Date YYYYMMDD format:', 'A', {'Current Date', 'Prior Date', 'Prior Week Date'},mono,free,,{'Current Date'},User:10))

    Regards

    Ashu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2015 at 02:26 AM

    You may want to read this to get a comprehensive view on this - http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.