Only One of Three Fields Required Validation Rule - Nintex Forms


Badge +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

Userlevel 6
Badge +22

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.

 

Badge +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!

Userlevel 6
Badge +22
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})
Badge +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?

Userlevel 6
Badge +22
Did you try import my sample form as the rule on the date control also works.

Reply