on 2024 Dec 12 2:19 PM
Hello,
I would like to have the sysdate by default on my prompt universe filter ?
How do I do for this ?
Request clarification before answering.
Since this will be a very useful prompt for multiple reports, I suggest coding it within the universe.
I am going to assume you are using Information Design Tool (IDT) for your universe development. If you are still using Universe Design Tool (UDT), you create an object with a prompt and logic that uses the system date if the prompt if empty. Let me know if more details are needed here.
In IDT, go to Parameters and Lists of Values. Create a parameter, type in the desired prompt text, set it to a date data type, under Set default values, select a formula and type in the SQL to provide the system date in your database. If you happen to have a calendar table that contains all valid dates, set that as the Associated List of Values but this is not required.
In your reports, set a condition where the desired date object = this new parameter. It will prompt you for a date and default to the system date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ferchi, Modify your prompt code to use a DECODE or CASE statement.
= (add_months(DECODE(@Prompt('Date: ', 'D', , mono, free, persistent), '', system_date, @Prompt('Date: ', 'D', , mono, free, persistent)),-18)+1)
Where system_date is the SQL based on your database.
In other words, if the value entered for the prompt is empty, use system date, else the value entered.
User | Count |
---|---|
52 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.