I'm new with AMPscript. I'm trying to make my AMPscript look better
%%[ var @pointsBalance, @memberLevel set @pointsBalance = AttributeValue("Total") if @pointsBalance > 1000 then set @memberLevel = "VIP" elseif 500< @pointsBalance and @pointsBalance <=1000 then set @memberLevel = "Gold" else set @memberLevel = "Standard" endif ]%% <p>You are a valued %%=v(@memberLevel)=%% member.<p>
I expected something like:
That means we just need to write the script in one line.
One more question. At first in the second condition I wrote
elseif 500< @pointsBalance <=1000 then ...
And it didn't work. Any suggestions to make the code better? Thank you in advance.