Page 1 of 1
Conditional Expression
Posted: Wed Jul 01, 2015 10:50 am
by fkmfkm
Can I do something like this in a Text Object ?
if {Table.Field} = 'A' then
'Active'
Else If {Table.Field} = 'X' Then
'Dead'
Else
'Unknown'
Re: Conditional Expression
Posted: Wed Jul 01, 2015 1:35 pm
by Alex K.
Hello,
Please try to use the following text expression:
Code: Select all
{IIF(Table.Field == "A", "Active", IIF(Table.Field == "X", "Dead", "Unknown"))}
Thank you.
Re: Conditional Expression
Posted: Thu Jul 02, 2015 7:29 am
by fkmfkm
Yup thats working...
Just another twist...can I code like this ? Don't really like the long long code.
{IIF(Table.Field == "A", "Active", "")}
{IIF(Table.Field == "X", "Dead", "")}
Re: Conditional Expression
Posted: Thu Jul 02, 2015 9:20 am
by HighAley
Hello.
You will get empty fist line if Field is not A.
It's better to use Switch function.
Thank you.