cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple OR functions going wrong

Hi,

 

I am having some problems with multiple OR functions in Forms 2013. A simplified scenario is:-

 

4 Form Variables contain inArray(lookup(......)) - to give me 4 true/false depending on contents of a List. I then need to know if any of those 4 variables have returned as true.

 

inArray1, inArray2, inArray3 all 'false', inArray4 'true'  - so overall should be a 'true'.

 

First off I tried nesting the OR functions:-

or((or((or(inArray1, inArray2)), inArray3)), inArray4)    - but returned 'false' instead of 'true'

 

Secondly I tried a two step process:-

Firstly

or(inArray1, inArray2) into FormVariable1    - returned 'false' correctly

or(inArray3, inArray4) into Form Variable2   - returned 'true' correctly

Then

or(FormVariable1, FormVariable2)  - returned 'false' instead of 'true' again!

 

Any help with what I/it is doing wrong, or on a different approach would be more than helpful!

Labels: (2)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: Multiple OR functions going wrong

Hi Tamsin,

try something like this:L

inArray1==true || inArray2==true || inArray3==true || inArray4==true

cheers,

Vadim

0 Kudos
Accept as Solution Reply
Not applicable

Re: Multiple OR functions going wrong

Hi Vadim,

 

Thank you for the suggestion - it didn't work exactly as you wrote it, but it did help me figure out the problem...I think!

It's a 'string'/'boolean' thing.

 

With my original methods, the inArray expressions return Booleans which are stored as 'String' Type Form Variables. The FIRST OR function accepts those Form Variables as Booleans so returns true, but is itself returning true/false & being saved as data type String which the SECOND OR doesn't recognise as a Boolean, so always returns false.

 

I am using your proposed method but replacing true with "true" - then all's well!

 

Thanks for the help :-)

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Multiple OR functions going wrong

Hi Tamsin,

I'm glad you got it working.  That's awesome. I must have had different types of controls, because I didn't need the quotations marks.  But it's good to know how you resolved it, because others, I'm sure, will come across this.

Thanks for sharing your solution.

cheers,

Vadim

0 Kudos
Accept as Solution Reply