Desktop productivity for business analysts and programmers

Cascading Prompts

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

Cascading Prompts

Hello,

I'm trying to establish if it possible to create cascading prompts in EG 5.1 based on date range values.  Essentially I need user to pick a date range and a list will dynamically populate a drop down with a list of items.

I have seen papers discussing dependencies between two drop downs and how to dynamically populate, however, I'm not sure if it is possible with a date range.

Any suggestions or examples are greatly appreciated.

Thx,

Rob


Accepted Solutions
Solution
‎01-07-2013 11:35 AM
Contributor
Posts: 45

Re: Cascading Prompts

Hi Rob,

It is possible using a stored process.

I tried taking an example table with one column containing dates and one with some plain text from my server.

I then create a stored process in EG and in the prompts create prompt_1 as a date range prompt,

then for prompt_2 I made it Numeric and User Selects values from a dynamic list.

I then browsed to the table with the data in and chose the date column for the unformatted data and the text column for the formatted data.

Then on the dependencies tab I added a dependency to prompt_1 so that my date column was between (inclusive) of the values in prompt 1

and the prompt populated only the text values where the date range was satisfied.

Unfortunately this may not get you all the way there as I the macro variable returned from prompt_2 will have the value of the date in the table and not the text value itself but it shouldn't be too much work to lookup the text you need using the date value in the prompt...

Generally I would do something like this by having my date range value pre-defined (or in a separate prompt) and then linking the prompt for text to a view of the data that is joined on the sashelp.vmacro table to limit to the date range i need, which means you don't need the stored process but can be trickier to get going.

Tim

View solution in original post


All Replies
Solution
‎01-07-2013 11:35 AM
Contributor
Posts: 45

Re: Cascading Prompts

Hi Rob,

It is possible using a stored process.

I tried taking an example table with one column containing dates and one with some plain text from my server.

I then create a stored process in EG and in the prompts create prompt_1 as a date range prompt,

then for prompt_2 I made it Numeric and User Selects values from a dynamic list.

I then browsed to the table with the data in and chose the date column for the unformatted data and the text column for the formatted data.

Then on the dependencies tab I added a dependency to prompt_1 so that my date column was between (inclusive) of the values in prompt 1

and the prompt populated only the text values where the date range was satisfied.

Unfortunately this may not get you all the way there as I the macro variable returned from prompt_2 will have the value of the date in the table and not the text value itself but it shouldn't be too much work to lookup the text you need using the date value in the prompt...

Generally I would do something like this by having my date range value pre-defined (or in a separate prompt) and then linking the prompt for text to a view of the data that is joined on the sashelp.vmacro table to limit to the date range i need, which means you don't need the stored process but can be trickier to get going.

Tim

Occasional Contributor
Posts: 12

Re: Cascading Prompts

Thanks Tim.

The stored process method works brilliantly.  Again Thank You.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 297 views
  • 0 likes
  • 2 in conversation