– In this URL - Example of a cascading prompt is explained. The example hierarchy is - Multilevel hierarchy.
Country
|
Resort
|
Service Line
I need to implement a different hierarchy.
I have a prompt: Select the Time Unit: Month/Quarter/Year
If user selects Month - Another prompt should come with all the Months.
hierarchy:
Time Unit
/ |
Month Qtr Year
To implement the required logic, first you should have following objects created in universe-
<Month_Obj> (to get list of months)
<Qtr_Obj> (to get list of quarters)
<Year_Obj> (to get list of years)
Now, create one more object (e.g <Prompt_Object>) with following definition-
case when @Prompt(‘Prompt Type’,‘A’,{‘Month’,‘Quarter’,‘Year’},mono,constrained) = ‘Month’ then @Select(Class_Name\Month_Obj) when @Prompt(‘Prompt Type’,‘A’,{‘Month’,‘Quarter’,‘Year’},mono,constrained) = ‘Quarter’ then @Select(Class_Name\Qtr_Obj) when @Prompt(‘Prompt Type’,‘A’,{‘Month’,‘Quarter’,‘Year’},mono,constrained) = ‘Year’ then @Select(Class_Name\Year_Obj) end
After that, create one condition (Prompt) based on above object
@Select(Class_Name\Prompt_Object) IN @Prompt(‘Select Values from List’,‘A’,‘Class_Name\Prompt_Object’,multi,constrained)
If you use this prompt in the report, you should get expected results.