Checking for blank dates

89 views
Skip to first unread message

Mike Wilson

unread,
Dec 19, 2021, 5:51:30 AM12/19/21
to Sailforms Users
Hi
I have existing code that checks a date for being empty by checking for "" or 0 and this still works.

But I can't get any new code to allow this in an If or If Test.

I have tried using a date function like weekday() to return "", but as soon as I delete the date from a field, the weekDay remains the previous value, it does not change to "".

Any ideas welcome.


MikeG

unread,
Dec 22, 2021, 2:35:52 PM12/22/21
to Sailforms Users
I find the most reliable way of checking for an empty numeric field (including a date) is to use the length command, so for field X ...
   if(length(X)=0, ...,...)

Reply all
Reply to author
Forward
0 new messages