Ok this one just hurts my head trying to think about the FormCalc script to write. What I need to do is validate a date/time field using the current date and specific values from a drop-down box. For example, in plain English: If today's date is 1/12/2011 and the drop-down value is "1" then the "start date" must be equal to or greater than two weeks in the future (1/26/2011).
To add a whole wrinkle to the problem. I need to add a message box if the following condition is met: If today's date is 1/12/2011 and the drop-down value is "1" and the "start date" is less than two weeks in the future (i.e. 1/25/2011).
Also, some of the values in the drop-down box do not require the same validation meaning that any date in "start date" is acceptable.
And one more thing, I still want the user to able to submit the form via email (I have a button) even if they put in a date less than two weeks triggering the message box.
Am I asking for too much. Or is this doable?
if (OEDCode == "5") then
(Num2Date(Date2Num(TrainingDay, "MMM DD, YYYY" - $, "MMM DD, YYYY") <= (14), "MMM DD, YYYY"))
else
$.rawValue = num2date(date(), DateFmt(2))
endif
Am I on the right track? When I test it, I get validation errors automatically when I open the pdf and when I change the fields in question.