Set Up Cascading Prompts Via a Filter

SAS provides multiple methods for setting up cascading prompts (a sequence of dependent prompts). You can define such a cascade in SAS Information Map Studio by selecting the option to establish dependencies for the prompts in a compound filter. When dependencies are established in a filter, each prompt in the filter is dependent on every filter rule (whether it contains a prompt or not) that precedes it in the filter expression.
In this scenario, your end users are complaining that the existing department prompt (in the Employee Statistics Sample information map) forces them to scroll through a long list of departments—they want to choose from the departments that exist at their respective locations only. So you want to create a filter that will enable a user to first select a location and then select from departments at that location.
You will modify the prompted filter that you created earlier and add to the filter an additional rule that includes a location prompt. This location prompt will be the prompt at the top of the cascade. The existing department prompt will be the dependent prompt.
Note: This scenario defines a two-prompt cascade, but you can cascade more than two prompts.
  1. Open the Employee Statistics Sample information map.
  2. In the SAS Information Map Studio main window, select the Design tab.
  3. In the Information Map Contents pane, right-click Which department?, and then select Properties from the pop-up menu to open the Edit Filter dialog box.
  4. In the Data item drop-down list on the Definition tab, change the selection from Department to Location.
  5. In the Value(s) section, click New to open the New Prompt dialog box.
  6. To create the prompt, complete these steps:
    Note: Accept the default settings for any fields that are not mentioned.
    1. In the Name field on the General tab, enter Location Prompt.
    2. In the Displayed text field, enter Please select a location:
    3. Select the Prompt Type and Values tab.
    4. In the Prompt type drop-down list, Text is preselected for you because the associated filter is based on character values.
    5. From the Method for populating prompt drop-down list, select User selects values from a dynamic list.
      Note: You can use any method to obtain values for the prompt in the first filter rule of a compound filter (that is, you can select any value for the Method for populating prompt field for that prompt). But each (subsequent) dependent prompt must be a dynamic prompt (that is, the value for the Method for populating prompt field must be User selects values from a dynamic list). Otherwise, the cascade will not execute correctly.
    6. In the Data source section, make sure that Use the current information map is selected. You cannot cascade prompts that use tables or other information maps as their respective data sources.
    7. Click the Specify button that is next to the Default value field.
    8. In the Default Value dialog box, select Cary and click OK to add it as the default value.
      New Prompt dialog box
    9. Click OK to create the prompt and return to the Edit Filter dialog box.
      Edit Filter dialog box
    10. Click Add to add this new filter rule to the filter expression. The new rule should be automatically selected in the Filter combinations table.
    11. The order of dependency is based on the order of the rules in the filter expression, so arrange the filter rules in the order that you want the prompts to be processed. Click The up arrow to make the new rule the first rule in the filter expression.
    12. Select Establish dependencies between prompts.
      Filter combinations section
    13. Click OK to update the filter.
    14. Save the information map with the name Employee Statistics Sample with Cascading Prompts.