Taking Your Dynamic Query Further: Cascading Parameters

In this post I want to explain what cascading parameters are and cover setting them up.

How Do Cascading Parameters Work?

The use of cascading parameters lets the user further define the selection criteria of their parameters. When values are selected for the first parameter, those values are then used to populate the values available in the next parameter using a WHERE clause inside the dynamic query.

Example Cascading Parameter: SELECT OrderID FROM Orders WHERE EmployeeID IN ?EmployeeID?

I have Employee ID 1 and 2. Each employee has order IDs associated with them. If EmployeeID 1 is the only selected employee ID, the next parameter selection for selecting Order IDs will only display Order IDs associated with employee 1.

Creating Cascading Parameters

NOTE: If you are not sure how to create a Dynamic Query, check out our previous post / documentation.

1. Create A View with at least two parameters.

2. Create the dynamic query for both parameters. Once you verify results for both parameters you can add the WHERE clause.

3. Add a WHERE clause to the second parameter's Dynamic Query using the first parameter's Name.

4. Run the View and verify proper results. You should see the parameter selection change based on the selection of the first parameter.

3 views0 comments

Recent Posts

See All