Time Range Validation in Nintex Forms (Responsive Designer)

In this scenario, we need to ensure that a form user can only select an appointment time during our business hours (for example, between 7:00 AM and 7:00 PM). On the Nintex form, we have a Date/Time control named AppointmentTime. If the user selects an appointment time outside of business hours, then the form will mark the AppointmentTime field as invalid and display a message instructing them to select a time during business hours.

This solution applies to the Responsive Designer in Nintex Forms for Office 365 and Nintex Forms for SharePoint.

Responsive Designer (configuration steps):

  1. Select the AppointmentTime date/time control in the form designer and click the “Add Rule” button in the ribbon to add a rule to this control.
  2. Configure the validation rule.
    • Name = Validate Appointment Time
    • When = and(not(isNullorEmpty(AppointmentTime)),or(greaterThanOrEqual(formatDate
      (AppointmentTime,”HH”),19),lessThanOrEqual(formatDate(AppointmentTime,”HH”),6)))
    • Then = Invalidate
    • Validation Message = Please select an Appointment Time between 7:00 AM and 7:00 PM.
  3. Preview the form.
    • The AppointmentTime field should be marked as invalid if a date is selected and a time before 7:00 AM or after 7:00 PM is also selected.

Leave a comment

Website Powered by WordPress.com.

Up ↑