cancel
Showing results for 
Search instead for 
Did you mean: 
Nintex Newbie

Validate Multi-Select: Any combination but one

Jump to solution

I have a multi-select field called Funding Sources which has the choices:

Not Required

Other

Capital Request

IT Captial

(Note: there are much more choices than this.)

Valid selections are:

1. Not Required is only selected

2. Any combination of all the choices EXCEPT Not Required

 

I know I could check for every combination with something like:

contains(FundingSources,'Not Required')&&contains(FundingSources,'Other')

but there must be a more graceful way.

 

Thanks for your help.

Labels: (1)
Tags (2)
0 Kudos
Reply
3 Replies
Highlighted
Automation Master
Automation Master

Re: Validate Multi-Select: Any combination but one

Jump to solution

@cmykkid .....There is a much simpler way to do that, below are the steps:

 

  1. Name your choice control on the form ctrl_ch_Funding_Sources
  2. Add another calculated control and name it ctrl_calc_Funding_Sources_Validation. Always hide this control (use 1<2 rule to hide)
  3. Use this formula in above calculated control "If(greaterThan(count(ctrl_calc_Funding_Sources_Validation),1), If(inArray(ctrl_calc_Funding_Sources_Validation, "Not Required"), "invalid", "valid"), "valid")
  4. Now create a validation rule on your choice control:
    1. Condition - ctrl_calc_Funding_Sources_Validation == "invalid"
    2. Message - Please un-check Not Required option.
Reply
Highlighted
Nintex Newbie

Re: Validate Multi-Select: Any combination but one

Jump to solution

Excellent Kunal. Nicely written. Thanks.

 

But I believe there's a typo in step 3. The Choice control needs to be targeted. It should be:

If(greaterThan(count(ctrl_ch_Funding_Sources),1), If(inArray(ctrl_ch_Funding_Sources, "Not Required"), "invalid", "valid"), "valid")"

 

Regardless, much simpler and works like a charm.

View solution in original post

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Validate Multi-Select: Any combination but one

Jump to solution

@cmykkid ....yes it is...sorry....wrong copy and pastein hurry Smiley Wink

 

Please mark this solution if it worked for you.

0 Kudos
Reply