Trouble with conditions of a validation rule

  • 27 September 2016
  • 3 replies
  • 2 views

Badge +2

I am struggling with this and I hope someone can assist.  I have a hidden panel that shows when one of the values in a choice control is selected.  The rule I have for that is: !(equals(AccessRequestTypeControl,"New Hire / Existing Employee needs Level2 access")) and it’s working just fine.

What I’m having trouble with is building a validation rule that prevents the controls within the panel from going through validation when someone tries to submit a form with any of the other choices.

I’ve tried 325786833556435735 different things and have spent hours on this, but nothing is working for me.  Can anyone lend some insight into how I should be approaching this?

 

Thx!


3 replies

Userlevel 5
Badge +12

Hello Sabrina,


So there are a couple of things to consider here.   For one, you cannot create a validation rule that will prevent validation from occurring.  By having a validation rule present, you are thereby requesting that validation occur.   What you need to do is think about it in the opposite:

I see that your fields have red * next to them, this most likely means that you have them marked as "required" in the list itself.   You will want to uncheck the required box and then create a validation rule that causes validation when it is needed (instead of the opposite as you were approaching it).

I hope this helps,

Mike

Badge +2

Mike, you're a genius!!! Thank you SO much!  There was nothing wrong with my validation rule, it was the requirement in the actual list.  All is working perfectly.

Userlevel 5
Badge +12

Thanks I appreciate that!  Glad I could help out. happy.png

Reply