This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /* | |
| * Lowercase logic | |
| * Converts the uppercase string to lowercase. | |
| */ | |
| VAR @name | |
| SET @name = Lowercase("JOHN DOE") | |
| ]%% | |
| %%=v(@name)=%% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /* | |
| * Trim Logic | |
| * Removes the white space before and after the text. | |
| */ | |
| VAR @value1, @value2 | |
| SET @value1 = " Hello World " | |
| SET @value2 = Trim(@value1) | |
| ]%% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /* | |
| * Empty logic | |
| * If subscriber FirstName exists then set the name var to FirstName. | |
| * If subscriber FirstName does not exist, then set the name var to Valued Customer. | |
| */ | |
| VAR @name | |
| SET @name = "" | |
| IF NOT EMPTY(@name) THEN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /* | |
| * Concat Logic | |
| * This combines three string values into a single string to show | |
| */ | |
| VAR @value1, @value2, @value3 | |
| SET @value1 = "This " | |
| SET @value2 = "is " | |
| SET @value3 = "cool" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /** | |
| * IndexOf Logic | |
| * Checks to see if the word Premium exists in the string value. | |
| */ | |
| VAR @cust_status, @cust_coupon | |
| SET @cust_status = "Premium Retail Customer" | |
| IF IndexOf(@cust_status,"Premium") > 0 THEN | |
| SET @cust_coupon = "Show Premium Coupon" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Length Logic | |
| * The length function returns a number value | |
| */ | |
| VAR @value1, @value2 | |
| SET @value1 = "Hello World!" | |
| SET @value2 = Length(@value1) | |
| ]%% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Replace Logic | |
| * Replaces 2007 with 2008 from the original string | |
| */ | |
| VAR @value1, @value2 | |
| SET @value1 = "The 2007 model is better" | |
| SET @value2 = Replace(@value1,"2007","2008") | |
| ]%% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Substring Logic | |
| * Only show two characters starting with the second character position | |
| */ | |
| VAR @value1, @value2 | |
| SET @value1 = "ABCDEF" | |
| SET @value2 = Substring(@value1,2,2) | |
| ]%% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Constant (Boolean Values) | |
| * Boolean constant values must use the words true or false. They are not surrounded by quotes. They are also NOT case sensitive. | |
| */ | |
| VAR @toggle1, @toggle2, @toggle3, @toggle4, @toggle5, @toggle6, @toggle7, @toggle8 | |
| SET @toggle1 = true | |
| SET @toggle2 = false | |
| SET @toggle3 = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Constant (Null Values) | |
| * etaphysical. | |
| */ | |
| VAR @string1, @string2, @string3, @string4 | |
| SET @string1 = "String1 Copy Here" | |
| SET @string2 = "" | |
| SET @string3 = '' |
OlderNewer