Creating Dependent Select Lists

Previous
Previous
Next
Next

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.

You can have one LOV drive another LOV by:

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 country name and country ID based on the state selected in the first LOV.

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