Previous
Previous
 
Next
Next

Creating Dependent Select Lists

You can use a select list to determine the range of values of another select list on the same page. You can achieve this functionality by having a driving select list submit values to a subsequent select list. You incorporate these values in the subsequent select list as a bind variable in the WHERE clause of its query.

To have one LOV drive another LOV:

Consider the following example. The first LOV enables the user to pick a state:

SELECT state_name d, state_id v
FROM states

The second LOV selects the county name and county ID based on the state selected in the first LOV:

SELECT county_name d, county_id v
  FROM counties
WHERE state_id = :P1_STATE_ID