Solved

Unable to get control to unhide properly with or rule

  • 24 April 2021
  • 4 replies
  • 4 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

 

 

icon

Best answer by Tarf 27 April 2021, 12:10

View original

4 replies

Badge +8

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.


 

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!!

Badge +8

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"))

 


 

Brilliant these both worked perfectly and I have learnt for next time thank you

Reply