cjwilson1009
Design Dabbler

Only One of Three Fields Required Validation Rule - Nintex Forms

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.OnlyOneRequired.png

 

0 Kudos
Reply
5 Replies
SimonMuntz
Nintex Employee
Nintex Employee

Re: Only One of Three Fields Required Validation Rule - Nintex Forms

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.

 

0 Kudos
Reply
cjwilson1009
Design Dabbler

Re: Only One of Three Fields Required Validation Rule - Nintex Forms

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!

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Only One of Three Fields Required Validation Rule - Nintex Forms

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})
0 Kudos
Reply
cjwilson1009
Design Dabbler

Re: Only One of Three Fields Required Validation Rule - Nintex Forms

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?

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Only One of Three Fields Required Validation Rule - Nintex Forms

Did you try import my sample form as the rule on the date control also works.
0 Kudos
Reply