Oracle APEX makes it easy to build interactive web applications — even without being a full-time developer. One of the simplest yet most powerful features is controlling the visibility of buttons based on certain conditions.
Let’s walk through how you can show or hide buttons like "Save" and "Create" dynamically in your APEX applications.
1ST SET STATIC ID OF BUTTONS AS :
DELETE
SAVE
CREATE
CLEAR
GO TO STATIC ID AT ADVANCED OF EACH BUTTONS.
IN DYNAMIC ACTION ON PAGE LOAD :
if ($v('P1_ID')) {
$('#SAVE').show();
$('#DELETE').show();
$('#CREATE').hide();
} else {
$('#SAVE').hide();
$('#DELETE').hide();
$('#CREATE').show();
}
IN DYNAMIC ACTION OF ID (PRIMARY KEY) COLUMN (ON CHANGE) :
if ($v('P1_ID')) {
$('#SAVE').hide();
$('#DELETE').hide();
$('#CREATE').show();
} else {
$('#SAVE').show();
$('#DELETE').show();
$('#CREATE').hide();
}