Date Validation Cases of Form Submission

Introduction

Brief Introduction

You can set date-related validations through Validations on form submission and apply it in daily practice.

Application Scenarios

It is mainly used in the following scenarios:

  • In the case of competition or event registration and data collection, you need to validate whether the data is submitted before a certain date.
  • In the case of meal ordering, daily reports, and other filling tasks, you need to validate whether the data is submitted before a certain time of the day.
  • In the case of after-sales service orders and weekend overtime applications, you need to validate data to ensure that they cannot be submitted on certain days of the week.
  • In the case of retroactive attendance and payment applications, you need to validate whether the data is submitted before a certain date each month.
  • In the case of conference room reservations and borrowing/returning registration, you need to validate whether the data is submitted earlier or later than the time set in the Date&Time field of the form.

Validating Data Submitted Before a Certain Date

Application Scenarios

Take the competition registration as an example, the organizer can set a registration deadline. After the expiry date, the registration form cannot be submitted.

How to Set

If you want to ensure that the competition registration form cannot be submitted after December 10. 2022, then you can:

1. Go to Design > Form Properties > Validations on form submission and click Add Condition.

2. Set the Prompt for failed check as follows:

Registration is closed, and you cannot register now!

3. Set the Formula as follows:

VALUE(TEXT(SYSTIME(),'yyyyMMdd'))<=20221210

4. Click OK to save the settings.

Preview

When the form is submitted beyond the registration time, it cannot be submitted successfully, and the following prompt will appear:

Validating Data Submitted Before a Certain Time of the Day

Application Scenarios

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

How to Set

If you want to ensure that the lunch ordering form cannot be submitted after 11:00 AM every day, then you can:

1. Go to Design > Form Properties > Validations on form submission and click Add Condition.

2. Set the Prompt for failed check as follows:

Today's ordering is closed, make a reservation tomorrow!

3. Set the Formula as follows:

VALUE(TEXT(SYSTIME(),'HHmm'))<=1100

4. Click OK to save the settings.

Preview

When the form is submitted beyond the daily ordering time, it cannot be submitted successfully, and the following prompt will appear:

Prohibiting Data Submitted on Certain Days of the Week

Application Scenarios

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

How to Set

1. Go to Design > Form Properties > Validations on form submission and click Add Condition.

2. Set the Prompt for failed check as follows:

Please submit the order on weekdays!

3. Set the Formula as follows:

AND(TEXT(SYSTIME(),'E')!=6,TEXT(SYSTIME(),'E')!=0)

4. Click OK to save the settings.

Preview

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

Validating Data Submitted Before a Certain Date Each Month

Application Scenarios

Take the retroactive attendance application as an example. The company needs to organize attendance data after the 25th of each month, so new retroactive attendance cannot be added. This means that employees cannot submit the applications after the 25th of each month.

How to Set

1. Go to Design > Form Properties > Validations on form submission and click Add Condition.

2. Set the Prompt for failed check as follows:

You cannot apply now. Please submit it within the specified time!

3. Set the Formula as follows:

DAY(SYSTIME())<=25

4. Click OK to save the settings.

Preview

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

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

Application Scenarios

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

How to Set

1. Go to Design > Form Properties > Validations on form submission and click Add Condition.

2. Set the Prompt for failed check as follows:

The Meeting Start Time must be later than the current time!

3. Set the Formula as follows:

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

4. 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 following prompt will appear:

Note

The cases shown all use regular forms as examples, so you need to set validations in Validations on form submission. If it is a workflow form, the validation conditions in Form Properties will no longer take effect, and you need to select a note to add a validation condition in Workflow > Node Properties > Advanced > Data meeting conditions > Add Condition. For details, see Node Validation.

Was this information helpful?
Yes
NoNo
Need more help? Contact support