cancel
Showing results for 
Search instead for 
Did you mean: 

@Prompts

0 Kudos

Hi Team,

I want to create a date prompt.

Lov's should show Values to range from last completed month to 24 months prior (current month -1 to current month – 25).

Default value: should get the last 90days data, .i.e Default = yesterday– 90 days

Most Important requirement is as follows:

Max amount of data that a user can query for when entering their own dates: 90 days, For this Point Lets take an example:

If user selects Start date : 2015 01 01 and End date: 2015 12 31, then Max amount of data to be fetched is 90 days, i.e from 2015 01 01 to 2015 03 30 (approx.),

Please provide your valuable inputs.

Thanks in Advance

Regards,

Siva

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member198519
Active Contributor
0 Kudos

Try something like this in Universe:

Type=@Prompt('1. Enter Schedule Type', 'Default', {'Default', 'Two years'}, mono, free,Persistent,{'Default'})

[Adhoc]= trunc(sysdate)

[Default] (Current date - 3 Months) = add_months(trunc(sysdate),-3)

[Filter]=

@Select(Date)

BETWEEN

CASE @Select(..\Type)

  WHEN 'Two Years' THEN add_months(@Select(..\Adhoc),-24)

  WHEN 'Default' THEN @Select(..\Default)

END

0 Kudos

Thanks Kuldeep.

Could you please be more specific.

former_member198519
Active Contributor
0 Kudos

At the universe level, Create two objects:

[Adhoc]= trunc(sysdate)

[Default] (Current date - 3 Months) = add_months(trunc(sysdate),-3)

Once created, then create a filter as mentioned in the above post.