script:
A statement is a command given by you to the computer to take specific actions and is used to describe a behavior or a logic. In the case of an IF statement, you set a condition that can be evaluated as true or false. For example: if gender equals male is true. Based on the result you define the action: if gender equals male is true, write Mr. Last Name.
A statement may have internal components (for example expressions like a personalization field). In case you need to define a statement, start it with a curly bracket followed by a percent sign and close it with a percent and a closing curly bracket. Between these, you need an actual statement defining what happens in all possible cases.
Let me show you another example. If the first name of your contact has 6 characters or more, display the words ‘Hello friend’, otherwise display ‘Hello first name’. For that, I need to use the filter called length, which counts the length of the word. It looks like this: .
So, if your contact is called Jonathan, the word ‘friend’ will be shown, but if the first name is just John, we can display that because it’s only 4 characters long.
If you’d like to combine the two previous examples in a statement, you need to start by checking if the first name has no value, and then continue as before.