Skip to main content

Date Validation Cases of Form Submission

This article will introduce how to set date-related validations through Validations on form submission and apply them to common business scenarios.


When to Use Date Validations?

Date validations can be mainly used in the following scenarios:

  • Validating whether data is submitted before a certain date, applicable to competitions, events, content collection, and other scenarios;

  • Validating whether data is submitted before a certain time of the day, applicable to meal ordering, daily reports, and other filling tasks;

  • Validating that data cannot be submitted on a certain day of the week, applicable to after-sales service orders, weekend overtime applications, and other scenarios;

  • Validating whether data is submitted before a certain date each month, applicable to retroactive attendance applications, payment applications, and other scenarios;

  • Validating whether the submission time is earlier or later than the time set in a Date&Time field of the form, applicable to conference room reservations, borrowing/returning registration, and other scenarios.


Validating Data Submitted Before a Certain Date

Take competition registration as an example. The organizer can set a registration deadline. After the registration period ends, the registration form cannot be submitted.

How to Set

Go to Competition Registration Form. Click add Data Validation under Form Submission.

Set the Prompt for failed check as follows: Registration is closed, and you cannot register now! Set the Formula as follows: VALUE(TEXT(SYSTIME(),'yyyyMMdd'))<=20221210

This means that the current server time must be earlier than or equal to December 10, 2022. Otherwise, the form submission will fail. After setting it up, click OK to save the settings.

Preview

When the form is submitted after the registration deadline, it cannot be submitted successfully, and the corresponding prompt will appear.


Validating Data Submitted Before a Certain Time of the Day

Take lunch ordering as an example. A restaurant can set a daily ordering deadline. After the ordering time ends, the lunch ordering form cannot be submitted.

How to Set

Go to Lunch Ordering Form. Click add Data Validation under Form Submission.

Set the Prompt for failed check as follows: Today's ordering is closed, make a reservation tomorrow! Set the Formula as follows: VALUE(TEXT(SYSTIME(),'HHmm'))<=1100

This means that the current server time must be earlier than or equal to 11:00 AM. Otherwise, the form submission will fail. After setting it up, click OK to save the settings.

Preview

When the form is submitted after the daily ordering deadline, it cannot be submitted successfully, and the corresponding prompt will appear.


Prohibiting Data Submitted on Certain Days of the Week

Take an after-sales service order as an example. A company can set the system to receive service orders only on weekdays. In this case, service orders cannot be submitted on weekends.

How to Set

Go to After-sales Service Order. Click add Data Validation under Form Submission.

Set the Prompt for failed check as follows: Please submit the order on weekdays!

Set the Formula as follows: AND(TEXT(SYSTIME(),'E')!=6,TEXT(SYSTIME(),'E')!=0)

This means that the current server time cannot be Saturday or Sunday. Otherwise, the form submission will fail. After setting it up, click OK to save the settings.

Preview

When the form is submitted on weekends, it cannot be submitted successfully, and the corresponding prompt will appear.


Validating Data Submitted Before a Certain Date Each Month

Using missed punch correction as an example, the company needs to consolidate attendance records after the 25th of each month. Therefore, no new missed punch requests can be created or submitted after the 25th.

How to Set

Go to Missed Punch Request. Click add Data Validation under Form Submission.

Set the Prompt for failed check as follows:You cannot apply after the 25th. Please submit it within the specified time! Set the Formula as follows:DAY(SYSTIME())<=25

This means that the current server time must be earlier than or equal to the 25th day of the month. Otherwise, the form submission will fail. After setting it up, click OK to save the settings.

Preview

When the form is submitted after the 25th, it cannot be submitted successfully, and the corresponding prompt will appear.


Validating Data Submitted Earlier/Later than the Time Set in a Date&Time Field

Take conference room reservation as an example. The meeting start time must be later than the current time. If the meeting start time is earlier than the current time, the reservation cannot be submitted.

How to Set

Go to Conference Room Reservation. Click add Data Validation under Form Submission.

Set the Prompt for failed check as follows: The Meeting Start Time must be later than the current time! Set the Formula as follows:

VALUE(TEXT(SYSTIME(),'yyyyMMddHHmm'))<=VALUE(TEXT(DATE(Start Time),'yyyyMMddHHmm'))

This means that the current server time must be earlier than or equal to the Meeting Start Time in the form. Otherwise, the form submission will fail. After setting it up, click OK to save the settings.

Preview

When the Meeting Start Time is earlier than the current time, the form cannot be submitted successfully, and the corresponding prompt will appear.


More to Know

The cases shown in this article all use regular forms as examples, so you need to set the validations under Validations on form submission.

If the form is a workflow form, the validation conditions in Form Properties will no longer take effect. Instead, you need to set the validation conditions for the node in Workflow > Node Properties > Rules > Data meeting conditions > Add Condition.

Did this answer your question?