Question

Make field required based on result of calculated field

  • 13 February 2023
  • 2 replies
  • 309 views

Badge

I have a SP list with 4 columns: 

  • Date1
  • Date2
  • Days between: Calculated field: Date2 - Date1
  • Reason for delay

How can I make the field Reason for Delay required in the Nintex form if the column Days Between > 22?

if possible, please explain step by step since I’m completely new to Nintex forms.

Thanks!


2 replies

Userlevel 6
Badge +16

Hi @omezquita 

Since your are completely new to Nintex Forms, suggest that you watch this basic tutorial for Nintex Classic Form.

 

 

Userlevel 5
Badge +13

First off, which forms designer are you using (Responsive or Classic)? In my example, I’m using the Responsive Designer.

I was able to get this working on my end using these steps:

  1. Add and configure form controls on the form for Date1 and Date2. Set “Date only” control configuration to Yes for both.
  2. Add and configure a Calculated Value control.
    - Name and Title = Days Between
    - Formula = dateDiffDays(Date2,Date1)
         - Click on the Formula Builder button to the right of the Formula field.
         - Go to the Runtime Functions tab and add the dateDiffDays function to the Formula.
         - Go to the Named Controls tab and add inside parentheses Date2,Date1
         - Click OK to add the formula.     - 
    - Connected to = Name of your list column to save the date difference (if needed)
    - Save the Calculated Value control configuration.
  3. Add and configure the Reason for Delay control.
  4. Add and configure a Rule to the Reason for Delay control.
    - Select the Reason for Delay control.
    - Click on the Add Rule button in the ribbon.
    - Configure the Rule.
         - Rule name = Require Reason for Delay
         - When = greaterThan(Days Between, 22)
              - Click on the Formula Builder button to the right of the When field.
              - Go to the Runtime Functions tab and add the greaterThan function to the Formula.
              - Go to the Named Controls tab and add inside parentheses Days Between control.
              - Complete the formula by adding ,22 
              - Click OK to save the formula.
         - Then = Invalidate
         - Validation Message = Reason for Delay required

 

 

 

Reply