Forum Discussion

ThommangoThomma's avatar
ThommangoThomma
Qrew Trainee
8 years ago

validate date fields before saving

I want to record the dates on which a boat will be leaving and returning to their dock.  I don't want the return date to predate the departure date.  I see how I can use a dynamic message to warn the user of invalid dates, but it lets them save it anyways.  (Seems to me that "prevent save" would be a good action to include in dynamic forms.)  But that doesn't seem to be an option.  I thought maybe a formula field holding the duration between the two dates would also work, but I don't see how the calculated field would be validated.  Am I missing something, or is this a glaring gap in the product design?

2 Replies

  • I suggest using a dynamic form rule.

    When the record is saved

    In the following conditions are true

    Departure date is less than an arrival date

    Action

    Abort the save with the following message

    Sorry but the record was not saved. The departure date is before the arrival date. Please correct your data and try again
  • Ah, I didn't see notice that I could include conditions other than those related to field actions.  Thanks.