Skip to main content

Hello!

In my Nintex form I have 3 distribution types where the user should indicate a letter code. I tried doing all 3 situations in one formula and it didn't work so I did it piece by piece. The following 3 formulas work separately.

   contains(Howshouldthismaterialbedistributed,"MACESS")&&ExistingLettersCode==''
   contains(Howshouldthismaterialbedistributed,"Pega")&&ExistingLettersCode==''
   contains(Howshouldthismaterialbedistributed,"xPression")&&ExistingLettersCode==''

  I tried combining them with && statements and it didn't work

contains(Howshouldthismaterialbedistributed,"MACESS") && contains(Howshouldthismaterialbedistributed,"Pega) && contains(Howshouldthismaterialbedistributed,"xPression")&&ExistingLettersCode==''I switched the ANDs to ORs and it recognized it as required but didn't recognize that it had been completed.

I could probably just use the separate rules but I am concerned about have 3 validation rules applied to one field (plus 1 formatting rule to it's panel. In my experience it is best to keep the amount of rules as minimized as possible so if there is a way to combine these your help would be greatly appreciated.

If the user selects any of those 3 options, existing letter's code is required? Or does the user have to select all 3 of those options? Also, what if the user selects those 3 but has also selected another different option. Is that possible or does that affect it?


‌ If they select ANY of the 3 options not all. They may select more than one channel and especially another channel that is not one of the 3 that have the requirement. Does that help?


And Existing Letter's code is a panel that shows or is it just a field that becomes required. Is that the only one or are there 3 separate ones for the 3 choices that can be chosen?


This will make it where if any of the three options are chosen with any other option it will make that field required.

Replace Options with the name control of the field. Use this rule on the field you want to be validated. Should be "Existing Letter's Code" - If I'm understanding it right.

Nintex Forms for Office 365

or(contains(Options, 'Option 1'), or(contains(Options, 'Option 2'), contains(Options, 'Option 3'))) && {Self} ==""

or(contains(Howshouldthismaterialbedistributed,'MACESS'), or(contains(Howshouldthismaterialbedistributed,'Pega'), contains(Howshouldthismaterialbedistributed,'xPression'))) && {Self} ==""


‌ Hello! At first I was bummed because it didn't work but then when I looked the formula again I realized I missed a comma which is why the formula builder is a little frustrating for me.  But.....IT WORKS! Thank you so much! I have a couple of other formula questions if you are able to help with those. as well that would be great!


Woohoo! Glad it worked! Ya! I can take a look no problem. Did you post them on here? Link me to them if so.


Reply