In this Oracle Apex tutorial, I will show you how to create a dynamic action to show/hide a region on the Select List change event.
We have an item P4_SHOWHIDE
as a Select List on page 4, containing static values Yes and No.
We have a region named Region-2 and it is required to show only when the P4_SHOWHIDE
list value is Yes.
Creating Dynamic Action to Show/Hide a Region in Oracle Apex
To do this task, do the right-click on the P4_SHOWHIDE
list item and select the Create Dynamic Action option.
Specify the following properties for the DA
- Event: Change
- Client-side Condition – Type: Item = Value
- Item: P4_SHOWHIDE
- Value: Yes
Now create a TRUE action and set the following properties
- Action: Show
- Selection Type: Region
- Region: Region-2
- Fire on Initialization: Yes (Turn the button on)
Then do the right-click on the True
action Show (you just created) and select the Create opposite action option from the shortcut menu.
Another False
action Hide will be created, as you can see in the above image.
Your task is completed. Save the changes and run the page to test.
Leave a comment