Can you do If..Else..Or.. in Expressions

Hi,
You can use any Excel function in the condition of the if, and this includes OR and AND. For example, you can do:
<#if(OR(<#myTable.**>="Hello"; <#myTable.**> = "Goodbye"; you can use more than 2 oORs)="GoodBye"; dosomething; dosomething)>

Now, no matter what, complex expressions can get ugly. What I normally do is to break them in expressions.

Say for example, define an expression "Test" to be OR(<#myTable.**>="Hello"; <#myTable.**>="Goodbye")
and then write.

<#if(<#Test>; dosomething; dosomething)>

You can go down this as much as you want or makes sense. Test could also be made from other simpler expressions, and you can even use parameters in expressions (see the demo in "Expression parameters")

Ps: About the second thing, the "Elseif" I am not sure I undestood it. Else is already in the if
<#if(a;dotrue;doelse)>
so the elseif in your example would never be called.
You could write
<#if(a;dotrue;<if(b;dob;doelse)>)>

but again, if you are going to nest a lot, expressions can help keep this simpler.

Adrian Gallero2012-02-14 17:58:00