4 Replies Latest reply on Jan 24, 2017 12:16 AM by Anuj Vaijapurkar

# How can I write multiple "Set" operations in THEN statement

Hi there,

I want to do something like this....

Parameter/filter - name = "Status" with 2 values "Include All" OR "Include None"

IF "Status" = Include All

THEN

SET Field 1 = "value x"

SET Field 2 = "value y"

SET Field 3 = "value z"

ELSE

SET Field 10 = "value PQRST"

SET Field 20 = "value XYZ"

SET Field 30 = "value ABCD"

END

• ###### 1. Re: How can I write multiple "Set" operations in THEN statement

Hey Anuj,

Try this:

IF "Status" = Include All AND Field 1 = "value x" AND Field 2 = "value y" AND Field 3 = "value z"

THEN

1

ELSEIF "Status" = Include None AND Field 10 = "value PQRST" AND Field 20 = "value XYZ" AND Field 30 = "value ABCD"

THEN

1

END

Cheers,

Matthias

1 of 1 people found this helpful
• ###### 2. Re: How can I write multiple "Set" operations in THEN statement

Hi Anuj

Not exactly sure, but something like this?

[Calculation1]

IF [Status] = "Include All"

THEN

(if [Set Field]="Field 1" then "value x"

elseif [Set Field]="Field 2" then "value y"

elseif [Set Field]="Field 3" then "value z" end)

ELSE

(if [Set Field]="Field 10" then "value PQRST"

elseif [Set Field]="Field 20" then "value XYZ"

elseif [Set Field]="Field 30" then"value ABCD" end)

END

Thanks,

Shin

1 of 1 people found this helpful
• ###### 3. Re: How can I write multiple "Set" operations in THEN statement

Hi Matthias,

A BIG thank you!

It worked perfectly as expected!