APEX Form Validation help
EwaverFeb 18 2013 — edited Feb 21 2013Hi,
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