Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Is there any doc on IIF usage?

mustafau3722362
Level 3
Level 3

Hi I am looking for a doc on using IIF at Adobe campaign.

Does anyone know a good reference?

1 Accepted Solution
DimaKudryavtsev
Correct answer by
Level 4
Level 4

Hi

There is no good manual for this function, but it is very basic and intuitive.

It looks like Iif(<expression>,<if expression truly, do this>,<otherways do that>)

Expressions can be any valid XTK expression, for example:

Iif(@myValue=1 and [nested/@value] >=2, "YES". "NO")

The following comparison operators are supported:

=, >, <, >=, <=, !=, IN, LIKE, NOT, IS NULL

Actions also can be anything, even another Iif() function. Ultimately, Iif will be converted to SQL expression CASE WHEN ... THEN ... ELSE ... END

p.s here are some resources:

Defining filter conditions

Advanced expression editing

View solution in original post

4 Replies
wodnicki
Community Advisor
Community Advisor

Hi,

The Iif() sql expression? It's documented in its call:

This is analogous to decode() in Oracle:

Thanks,

-Jon

mustafau3722362
Level 3
Level 3

Thanks for the page wodnicki,

before I write here I saw that page.

The page does not provide real-life use cases and syntax for Adobe campaign.

Do you know any resource that shows various codes?

DimaKudryavtsev
Correct answer by
Level 4
Level 4

Hi

There is no good manual for this function, but it is very basic and intuitive.

It looks like Iif(<expression>,<if expression truly, do this>,<otherways do that>)

Expressions can be any valid XTK expression, for example:

Iif(@myValue=1 and [nested/@value] >=2, "YES". "NO")

The following comparison operators are supported:

=, >, <, >=, <=, !=, IN, LIKE, NOT, IS NULL

Actions also can be anything, even another Iif() function. Ultimately, Iif will be converted to SQL expression CASE WHEN ... THEN ... ELSE ... END

p.s here are some resources:

Defining filter conditions

Advanced expression editing

View solution in original post