In Oracle Forms, you can make a field mandatory at design time and at the runtime. Examples for both the methods are given below:
Make a Field Mandatory at Design Time in Oracle Forms
Whenever we create a form based on a table, then we already know that which field in that table is mandatory, means a field is having a primary key or having a not null constraint. So it is recommended to make that field mandatory in Oracle Forms at design time. Below are the steps:
- In Oracle Forms, right click on that field and choose Property Palette option.
- In Property Palette, set Required property to Yes in the Data section as shown in the below image:
Make a Field Mandatory at Runtime
SET_ITEM_PROPERTY('EMP.ENAME', REQUIRED, PROPERTY_TRUE);