Forum Discussion
PhillipDennis
9 years agoQrew Cadet
You can use a form rule to prevent the record from being saved if the date is after the current date (see image below).
Adding a form rule that will change the date to the current date if the user tries to set it for a future date works sometimes but not every time. The rule to prevent it from being saved is the better way.
Note that this won't prevent users from entering a future date using grid edit, another form, or the API.
Depending on your use case, you could also create a second date field - a formula date field - to make sure the date is never later than the current date. Users could enter any date they want in the first date field, using any form, grid edit, or the API - and the value of the formula date field would either be the date chosen by the user or the date the record was created, whichever is earlier.
Phillip Dennis
Adding a form rule that will change the date to the current date if the user tries to set it for a future date works sometimes but not every time. The rule to prevent it from being saved is the better way.
Note that this won't prevent users from entering a future date using grid edit, another form, or the API.
Depending on your use case, you could also create a second date field - a formula date field - to make sure the date is never later than the current date. Users could enter any date they want in the first date field, using any form, grid edit, or the API - and the value of the formula date field would either be the date chosen by the user or the date the record was created, whichever is earlier.
Phillip Dennis