Page 1 of 1

Correct syntax for IIF with 2 arguments

Posted: Wed Dec 08, 2010 9:13 am
by Jennypi
Hi,

I am trying to define IIF with 2 conditions. How am I supposed to write it?
I tried this:

Code: Select all

{IIF(Data.name.Substring(11,3)=="HF1",IIF(Data.important_data=="PARENT",Data.important_data,""))}
but I am getting this error :
"no overload for method 'iif' takes '2' arguments"
Should I use an "AND" operator?

Thank you for your help.

Correct syntax for IIF with 2 arguments

Posted: Thu Dec 09, 2010 12:34 am
by Alex K.
Hello,

Please check the following expression

Code: Select all

{IIF(Data.name.Substring(11,3)=="HF1", IIF(Data.important_data=="PARENT",Data.important_data,""), "")}
Thank you.

Correct syntax for IIF with 2 arguments

Posted: Thu Dec 09, 2010 3:44 am
by Jennypi
Thanks a lot!

Correct syntax for IIF with 2 arguments

Posted: Thu Dec 09, 2010 4:03 am
by Alex K.
Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.