on 01-24-2011 12:52 PM
Hi,
I am creating an @prompt varaiable for Date.
@Prompt('message','type',[lov],Mono|Multi, free|constrained|primary_key,persistent|not_persistent,[default_values])
Requirement is in Place of "Default Values" i sthis possble to show a variable from Universe? User want Today as Default date for this. I created Today in Universe but when I place in replacement to [default values], it is not parsing. Please help me to resolve this.
Nanda
This blog entry should help you:
http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I'm not wrong you can't use functions in Default Values place.
The only way to get a deafult values is following the instructions in the link given by Me_MAP.
This is the formula you have to use in your filter:
table.date_field = case when @Prompt('Enter date','D',,mono,free) = '1900-01-01' then convert(date,getdate()) else @Prompt('Enter date','D',,mono,free) end
I'm using Sybase database so I'm using this functions: convert(date,getdate())
But if you are using other kind of database you have to replace that code with the one your database uses to generate today's date.
User | Count |
---|---|
87 | |
11 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.