Jump to content
Sign in to follow this  
robwebb

Date Validation

Recommended Posts

I have a date field in a fmp 4.0 database and currently have the following calculation to make sure the user enters a date in the future.

date > Status(CurrentDate)

but now i need to change it so the user has to enter a date that is at least 1 day in the future. e.g today is 13/08/2002 so the earliest date the user can enter would be 14/08/2002.

Share this post


Link to post
Share on other sites

field validation by calculation

date > Status(CurrentDate)

would just be fine with option check only if field has been modified

Dj

Share this post


Link to post
Share on other sites

Thanks for your help but i dont want to allow the user to be able to enter todays date because it's in an ordering system where you type in the date that you want your order to be made up which has to be at least 1 day from the date the order is placed

so i have to use the current date + 1 day but dont know how to enter this in the calculation field

Share this post


Link to post
Share on other sites

Well, if you don't want to validate field and hence present to user an warning dialog than you need two fields on for data input and second, calculated for error correction (obviously you should use the second one for any meanings)

So let say that you have field date now create an calc field say dateCorrected as result date

If(date>Status(Currentdate),date,Status(Currentdate)+1)

Finally overlay those fields with dateCorrected on top and make it opaque and with option allow entry into field unchecked (the "date" field itself should have this option checked, however)

HTH

Dj

Share this post


Link to post
Share on other sites

How about reading entire thread before responding, Rigsby?

BTW date>Status(CurrentDate) is the right validation formula. wink.gif

Dj

Share this post


Link to post
Share on other sites

Sorry! Seems I jumped the gun with the formula. Your formula is correct, of course.

As far as reading the whole thread goes

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.