Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

APEX Form Validation help

EwaverFeb 18 2013 — edited Feb 21 2013
Hi,

I really appreciate your help ;)

I have a simple form with the following columns:

:P7_BILLING_START_DATE
:P7_BILLING_END_DATE

I want to create a simple validation where if someone enters a BILLING_END_DATE that is < the BILLING_START_DATE
then 'End date cannot be less than end date' will return the error.

If the BILLING_END_DATE IS LEFT blank or if the end data is > the BILLING_START_DATE then the form should submit as normal (i.e. either null or the end date).

I've tried about every combination I can think of..the latest being..

IF :P7_BILLING_END_DATE < :P7_BILLING_START_DATE AND :P7_BILLING_END_DATE IS NOT NULL THEN
RETURN TRUE;
ELSE RETURN FALSE;
END IF;

I have also tried conditions like "Value of Item / Column in expresion is NOT NULL to account for the BILLING_END_DATE.

If I use this (below)..I get the right validation if I enter a date < the start date, but if I leave the end date blank it still gives me the error.

IF :P7_BILLING_END_DATE < :P7_BILLING_START_DATE
RETURN TRUE;
ELSE RETURN FALSE;
END IF;

Thanks again for your much needed expertise,

David
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2013
Added on Feb 18 2013
21 comments
2,746 views