Creating Cascading Prompted Filters

Defining and Applying Prompted Filters

A prompted filter can be included in a cascade if it meets the following requirements:
  • It is based on a relational data source.
  • The data item associated with the prompt filter allows the user to see its values. (The data source creator sets this in the information map using SAS Information Map Studio.) To verify, select Properties on a data item. In the Value-Generation Method tab, the User selects values from a dynamic list option should be selected.
  • The prompt type of the prompted filter allows the values of the data item associated with the prompted filter to be loaded dynamically.
In SAS Web Report Studio, you can set the prompt type to dynamic in the Custom Filter dialog box by selecting the Dynamically generate values option from the Prompt type drop-down list.
A non-prompted filter can be included in a cascade if it begins the cascade; however, it will not appear in the prompts page.
Prompted filters defined in either SAS Web Report Studio or SAS Information Map Studio can be used in a cascade. You have to select them in the Section Filters dialog box to participate in the cascade.
Manage Prompts Dialog Box Showing Prompts for Region, State, and City
Manage Prompts Dialog Box Showing Prompts for Region, State, and City

Ordering Prompted Filters

You can order all applied prompted filters, whether they participate in a cascade, using the Manage Prompts dialog box, which is available from the Section Filters dialog box.
Note: Only advanced users can manage prompts. If you have questions about your authorization, contact your system administrator.
The Prompt Order section enables you to specify the order in which the prompts appear on the Prompts page or any other page where values for prompts need to be filled in. To reorder, select the prompt that you want to move, and then click up arrow icon or down arrow icon to move the prompted filter up or down in the order. If prompts are in a cascade, the prompts should appear consecutively in cascade order; however, you can put the prompts in any order.

Defining Dependencies Between Two Prompted Filters

A cascade relationship is defined between a prompt contained in one prompted filter and another filter.
For example, Filter 1 is called City Filter and contains the prompt called City Prompt, and Filter 2 is called State Filter and contains the prompt called State Prompt. To define a cascade between the filters, you would specify that City Prompt depends on State Filter. Note that the information that would be displayed by the prompt is always a subset of what would displayed by the filter.
You can define dependencies using the Manage Prompts dialog box in the Prompt Dependencies section. The Prompt drop-down list contains the names of the prompts that can participate in a cascade. The Dependency drop-down list contains the names of the filters that can participate in a cascade.
To define a cascade, complete these steps:
  1. Select an entry from both the Prompt and Dependency drop-down lists.
  2. Click Add. The prompt dependency appears in the Prompt Dependencies area.
  3. Click OK.
The cascade definitions do not have to appear in any particular order; however, when you click OK, a check is performed to ensure that there are no circular dependencies or other illegal cascade definitions.
To remove a cascade, select an entry in the Prompt Dependencies area and then click Remove. If you remove a cascade that was a part of a chain, then the chain is not repaired to skip the missing item. For example, you have three cascade definitions where ZIP code depends on City, City depends on State, and State depends on Region. If you remove City, which depends on State, then the definition is not altered to make ZIP code somehow dependent on Region.

Supplying Values for a Cascading Prompt

When cascading prompts appear on the Prompts page, each dependent prompt is disabled until you supply the information for the filter that the prompt depends on.
In Example of a Cascading Prompt for Region, CENTRAL has been selected for the Region prompted filter, so the State prompt has been populated with states that are in the central region and the State prompted filter is enabled.
Example of a Cascading Prompt for Region
Example of a Cascading Prompt for Region
In Example of a Cascading Prompt for State, MN has been selected for the State prompted filter, so the City prompt is populated with the cities in Minnesota and the City prompted filter is enabled.
Example of a Cascading Prompt for State
Example of a Cascading Prompt for State
Next, a user can select cities and then click View Report to see the report based on the results of the cascaded prompt.