1

In Ampscript, how does would you write multiple conditions in a IF statement. for example I want all conditions to be true in the IF statement

set @var1=0
set @var2=0
set @var3=1

if (@var1 == 0 && @var2==0 && @var3 == 0) then 

is this the correct way to do it in Ampscript?

1 Answer 1

6

Replace the && with AND. Also || is OR.

set @var1=0
set @var2=0
set @var3=1

if (@var1 == 0 AND @var2 == 0 AND @var3 == 0) then 
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .