Hello,
I have got a problem with date fields validation.
I use the following formula on entry validation for date fields
@If(@IsNull(my_field_name);@Success;@If(@IsTime(my_field_name); @Success;@Failure(“This is not a valid date”)))
I put a refresh function in the OnChange event of the field so that the validation formula would be check when the user is leaving this field.
This works fine for some entry but others like “asf” for example go through the validation.
When the doc is saved, then my error message appears.
So my validation formula works fine when a save event is used and not when the refresh event is used. Is there anyway to force it ? Or do you know any other good formula to validate the entry in a date field ?
thanks for your help
luc
Subject: date field validation
ok, got it.
the Onchange event simply not starts when a date field goes from empty to litteral entry.
I put my refresh code in “Exiting” event and that works fine.
luc
Subject: RE: date field validation
ok good
just enable this property in field properties
3rd tab advanced tab
Run exiting/on change events after value change.
Subject: date field validation
Hi Friend
in the field Input validation event .,w rite the code
@if(datefield=“”;@failure(“Enter the Date”);@success)
in date field, user cannt enter text /number. the date field automatically validates
Let me know , if doesnt work according to ur requriment.
Bye
Subject: RE: date field validation
Thanks Mahesh but as you can see in my formula, I allow empty entry.
If the entry is not empty, I check if it is a Time entry.
The formula is good I think.
I don’t understand why the refresh method contains in the OnChange event, does not detect the error.
When I press F9 (refresh button), my error message appears.
My refresh method works fine for numeric fields and in some case for date fields… don’t knwo why some letters put in date field do not active the error message…
luc