Skip to main content
Nintex Community Menu Bar
Solved

Unable to get control to unhide properly with or rule

  • April 24, 2021
  • 4 replies
  • 52 views

Hi all,

 

Hoping someone can help as I am clearly getting my rule wrong. I have a control that I want to unhide if either part of a quality check fails (or both), after much research i came up with an or cluster:

 

or(not(contains(ProcessScore, "Fail")),not(contains(ServiceScore, "Fail")))

 

Unfortunately this only unhides the control when both fields fail, which is fine but I also need it to appear if one is set to Pass and the other Fail.

 

Any ideas? Many tha

 

 

Best answer by Tarf

Hi @kindrex 

your rule would only be applied if both Score fields contain "Fail".

 

I think this could work:

isNullOrEmpty(my-control) && (contains(ProcessScore, "Fail") || contains(ServiceScore, "Fail"))

 

 

4 replies

Forum|alt.badge.img+8
  • Novice
  • April 26, 2021

Hi @kindrex,

this means you want to hide the control if both quality checks are successful?

Something like 

not(contains(ProcessScore, "Fail")) && not(contains(ServiceScore, "Fail"))

should do the trick. If both ProcessScore and ServiceScore do not contain "Fail" hide the control, otherwise show it.

 


  • Author
  • April 27, 2021

Hi @Tarf 

 

That worked perfectly for unhiding the control! The final step would be for me to add a validation rule, which I have done something similar when only referring to one control but as this is referring too two its being awkward

 

isNullOrEmpty(Remediation) && ProcessScore == "Fail" && ServiceScore == "Fail"

 

Any ideas? And thank you again!!


Forum|alt.badge.img+8
  • Novice
  • Answer
  • April 27, 2021

Hi @kindrex 

your rule would only be applied if both Score fields contain "Fail".

 

I think this could work:

isNullOrEmpty(my-control) && (contains(ProcessScore, "Fail") || contains(ServiceScore, "Fail"))

 

 


  • Author
  • April 27, 2021
Brilliant these both worked perfectly and I have learnt for next time thank you