Validate multiple fields on SavePosted: August 14, 2012
How to validate two date fields in Oracle Apex.
Into the wonderful world of Oracle Apex development, I must admit, if you know Oracle SQL and PL/SQL then this is a great application development tool.
Any way I wanted to ensure that the a date entered was greater than another date column, pretty simple 🙂
The application field names are called
To create validation on the PERIOD_END_DATE field. Navigate to the field in the report columns section of the application.
Right click on the field name and choose Create Validation
Once the validation screen is open there are numerous types, we are going to use the “Function Returning Boolean” for more options and examples read up on the subject matter Understanding Validations
The documentation is OK but they do leave some bits out, go figure :).
Now we have chosen the correct type, we need to enter a Validation Expression
IF : PERIOD_END_DATE <= : PERIOD_START_DATE THEN
Set always execute to Yes
Enter and appropriate error message.
The final area is the conditions.
This is when the validation will take place and on what data.
You pick the button and execution scope.
The button is self explanatory, I would set the scope to created and modified rows.