QuestionQ111

VerifiedScripting and Automation

A developer wants to create a CloudPage linked from an email.

%%[  
SET @point = RequestParameter(favfood)  
  
SET @value = 5 -  
  
IF Length (@point) > 1 THEN SET @value = 1  
ELSEIF Length(@point) > 2 THEN SET @value = 2  
ELSEIF Length(@point) > 3 THEN SET @value = 3  
ELSEIF Length(@point) > 4 THEN SET @value = 4  
  
ENDIF -  
]%%  

What value is expected for @value when favFood = 'Taoos'?

Explanation

Taoos has a length of 5, which satisfies the first condition, Length(@point) > 1. In an IF/ELSEIF chain, only the first true branch runs, so @value is set to 1.

Community Discussion

No comments yet. Be the first to start the discussion!