Format control based on this OR that

  • 21 July 2015
  • 1 reply
  • 0 views

Badge +4

Greetings all,

I'm having problems this morning conditionally hiding a control based on two conditions. Hardware is a multichoice field, (which I realize after further work needs to be evaluated as contains(Hardware,"Other") to equal true if more than one item are selected), and Computer_Type is a single choice field.

I'm trying to reveal a people picker when Hardware type is "Other" or Computer Type is "Non-Standard Equipment." I also tried just breaking this into two separate rules but that won't work because one rule supersedes the other...

I have tried the following:

The following only evaluates true if BOTH are true

(Hardware!="Other" || Computer_Type!="Non-Standard Equipment")

(Hardware!="Other") || (Computer_Type!="Non-Standard Equipment")

or(Hardware!="Other",Computer_Type!="Non-Standard Equipment")

These conditions break the form preview entirely (it just appears blank)

(Hardware!="Other" or(Computer_Type!="Non-Standard Equipment")) //I get why this broke after reading the Help file

if(Hardware!="Other" | | Computer_Type!="Non-Standard Equipment", True, False) //I added a space in between the pipes, because there was a space between them in the Help file

if(Hardware!="Other"| |Computer_Type!="Non-Standard Equipment", True, False) //Again with the space...

And these conditions just do nothing...

or(contains(Hardware,"Other"), (Computer_Type!="Non-Standard Equipment"))

if(Hardware!="Other" || Computer_Type!="Non-Standard Equipment", True, False)


1 reply

Badge +6

Hi Daniel,

Looks like you were close!

Try:

If(or(contains(Hardware,"Other"),Computer_Type=="Non-Standard Equipment"),false,true)

Cheers,

Mark

Reply