Skip to main content
Nintex Community Menu Bar

Only One of Three Fields Required Validation Rule - Nintex Forms

  • July 23, 2020
  • 5 replies
  • 25 views

cjwilson1009
Forum|alt.badge.img+4

I have a Nintex Form with a field for the user to select a "Product Group." Next to that field are 3 additional fields that are related to the "Product Group" field. I want to create a rule that will make ONLY ONE of those three fields required if the "Product Group" is not blank. 

 

The current validation rule I have is applied to all three of those fields, but it's making each required when I only want one of the three fields required. The current rule is: 

 

and({Self}=="" , Approved1=="FX" || Approved1=="IRD" || Approved1=="Commodity")

 

HELP!! 

 

I attached an image that shows more what I'm talking about.8487iC1DCBD1D163C8E59.png

 

5 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 24, 2020

Hi,

 

Thought it would be easier to make you a demo form rather than explain this so I have attached one.

When you select a product group if none of the three fields are completed all will invalidate.

If one of the three fields is completed none of them will invalidate.

 

Hope this helps.

 


cjwilson1009
Forum|alt.badge.img+4

Hi,

 

Thank you, but unfortunately, I'm unable to open the file you attached. Would you be able to post the rule you created so I can take a look? I'd really appreciate it!


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 26, 2020
Hi,

To use the attached file you need to unzip it and then open the Nintex Forms designer and pick a classic form and then click import from the ribbon and select the unzipped file.

On the years control I used this rule:
!isNullOrEmpty(ProductGroup) && isNullOrEmpty(Month) && isNullOrEmpty(Date) && isNullOrEmpty({Self})

On the Month control I used:
!isNullOrEmpty(ProductGroup) && isNullOrEmpty(Years) && isNullOrEmpty(Date) && isNullOrEmpty({Self})

On the Date control I used:
!isNullOrEmpty(ProductGroup) && isNullOrEmpty(Years) && isNullOrEmpty(Month) && isNullOrEmpty({Self})

cjwilson1009
Forum|alt.badge.img+4

Thank you so much!

 

The rule for the year and months works great, but the one for the date field isn't firing for some reason. IDK why, maybe it has something to do with it being a date field?


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 27, 2020
Did you try import my sample form as the rule on the date control also works.