Oracle Application Express 5: Developing Web Applications — Question 51
A City Administration app has two select lists (LOVs). P1_STATE is based on "STATE" and P1_CITY is based on "CITY".
The CITIES table includes both the STATE and CITY columns. When a state is selected, the application should display only cities within the selected state, not all cities.
How can you limit the cities to display only those for the selected state?
Answer options
- A. Write a Set Value dynamic action against P1_STATE to require the P1_CITY based on the selected STATE.
- B. Add P1_STATE to the "Page Items to Submit" property in P1_CITY.
- C. In P1_CITY, set the "Cascading LOV Parent Item(s)" to P1_STATE.
- D. Write an Execute PL/SQL Code dynamic action against P1_CITY to select the correct cities based on P1_STATE.
Correct answer: A
Explanation
The correct answer is A because creating a Set Value dynamic action for P1_STATE allows you to update P1_CITY based on the currently selected state, effectively filtering the cities shown. Options B and C do not directly link the selection of P1_STATE to a dynamic update of P1_CITY, while option D involves executing PL/SQL, which is more complex than necessary for this filter functionality.