Oracle APEX – make a field conditionally required

As you have probably found, you cannot just set the dependent item’s Required attribute, as this makes it required even when hidden. Instead you can create a Validation of type “Item is NOT NULL” on the dependent item, but with a server-side condition based on the value of the other item.

For example, suppose the first item is P12_JOB and the second is P12_COMMISSION, and P12_COMMISSION is only shown when P12_JOB = ‘SALESMAN’. Then this Validation will do it:

Comments