Validate choice against choice?


Badge +2

Hi Nintex Community,

I'm needing to validate a choice field against another choice field.

I have one field of Position levels (1-5) and another field of pay levels(1-3).

There are two items of validation I need.

   If they are selecting position level 1, they can only select select pay level 1,

   If they are selecting position level 5 they cannot select pay level 3.

I know this is really simple and i apologise for the dumb question, I just can't for the life of me figure out how to do it.

Thanks,
Rob


5 replies

Userlevel 2
Badge +11

Hi Rob Eadie,

You could make Pay Level a text field and in the form add 3 choice controls connected to Pay Level. 1 choice control shows all Pay Levels, 1 only Pay Level 1 and the 3rd Pay Levels 1 and 2. User Formating rules to hide each (so they should have a name) based on the selected Position Level.

Userlevel 5
Badge +14

Create a validation rule with formula like

(PositionLevelControl == "PosLevel1" && PayLevelControl != "PayLevel1") ||

(PositionLevelControl == "PosLevel5" && PayLevelControl == "PayLevel3")

Badge +2

Hi Marian, 
Thanks for the response. it worked a treat!

Thank you so much

Rob

Badge +2

Hi Jean-Pierre

Thanks for the response.
I did consider your solution before posting, the reason for using Marians solution was to reduce the number of active rules.
Cheers,

Rob

Userlevel 2
Badge +11

No problem. My solution was more from a user experience perspective (why can I choose certain combinations only to get an validation error????). But Marian indeed answers your question. Hopefully in a next Forms version we can use Named Controls in a Choices formula wink.png

Reply