Email Manager - CAMPAIGN BUILDER

HOME

Additional Functions

ViewLink

You can add a link into any of your templates which will allow the recipient to view the message in their web browser. Simply create a link where the href is <a href="{viewlink}"> . This is handy for recipients that might have trouble viewing your html content, particularly Rich Media. The default ViewLink will present the same template that it appears in, with the exception of a multi-part message, in which case the html part of the message will display in the browser even when the link in the text template is clicked.

Note:

For advanced users

To allow a recipient to see a template other than the one in which the ViewLink appears, create a ViewLink as described but add the template ID of the template you want displayed as follows - <a href="{viewlink:X}"> where X is the template ID. This is useful for creating landing pages that track and behave just like templates that you have mailed out.

Text Manipulation Functions

The following Text Manipulation functions are provided for use in your Creative. These functions can be used anywhere a variable or action is used, such as in a template, in a variable definition, or a data entry box in 'Send a Message'

APPEND - {var}.append([arg1] [arg2])
    arg1 - string to append if {var} is not null.
     arg2 - string to append if {var} is null - this argument is optional.
    example - {name}.append([, welcome!])
    if {name} = "Jack" then result = "Jack, welcome!"

PREPEND - {var}.prepend([arg1] [arg2])
    arg1 - string to prepend if {var} is not null.
     arg2 - string to prepend if {var} is null - this argument is optional
    example - {name}.prepend([Hello])
    if {name} = "Jack" then result = "Hello Jack"

CAPITALIZE - {var}.capitalize
     Capitlizes the first letter of {var}

UPPERCASE - {var}.uppercase
    translate {var} to all uppercase

REPLACE - {var}.replace([arg1] [arg2])
    arg1 - search string
    arg2 - replace string

FORMATDATE - {var}.formatdate([arg1])
    arg1 - output format where:
      d - day of the month, no leading zero
      dd - two digit day of the month, leading zero
      ddd - three letter abbreviated day of the week
      dddd - full day
      M - numeric month, leading zero
      MM - numeric month, no leading zero
      MMM - three letter abbreviated month
      MMMM - full month
      y - year without century, no leading zero
      yy - year without century, leading zero
      yyyy - four digit year
      gg - period era
      h - 12-hour clock hour, no leading zero
      hh - 12-hour clock hour, leading zero
      H - 24-hour clock hour, no leading zero
      HH - 24-hour clock hour, leading zero
      m - minute, no leading zero
      mm - minute, leading zero
      s - second, no leading zero

      ss - second, leading zero
      f - fraction of a second, single digit precision

      ff - fraction of a second, double digit precision

      fff - fraction of a second, three digit precision
      ffff - fraction of a second, four digit precision

      fffff - fraction of a second, five digit precision
      ffffff - fraction of a second, six digit precision

      fffffff - fraction of a second, seven digit precision
      t - single digit AM/PM indicator
      tt - AM/PM designator
      z - "+" or "-" followed by time zone offset hour, no leading zero
      zz - "+" or "-" followed by time zone offset hour, leading zero
      zzz - "+" or "-" followed by full time zone offset hour and minutes, leading zeros

   example - {date}="12/13/2003"
      {date}.formatdate([ddd dd MMMM, yyyy]) = "Wed 13 December, 2003"

FORMATNUMBER - {var}.formatnumber([arg1])
      arg1 - output format where:
         None - Displays the number with no formatting.

(0) - Digit placeholder. Displays a digit or a zero. If the expression has a digit in the position where the zero appears in the format string, display it; otherwise, displays a zero in that position. If the number has fewer digits than there are zeros (on either side of the decimal) in the format expression, displays leading or trailing zeros. If the number has more digits to the right of the decimal separator than there are zeros to the right of the decimal separator in the format expression, rounds the number to as many decimal places as there are zeros. If the number has more digits to the left of the decimal separator than there are zeros to the left of the decimal separator in the format expression, displays the extra digits without modification.

(#) - Digit placeholder. Displays a digit or nothing. If the expression has a digit in the position where the # character appears in the format string, displays it; otherwise, displays nothing in that position. This symbol works like the 0 digit placeholder, except that leading and trailing zeros aren't displayed if the number has fewer digits than there are # characters on either side of the decimal separator in the format expression.

(.) - Decimal placeholder. The decimal placeholder determines how many digits are displayed to the left and right of the decimal separator. If the format expression contains only # characters to the left of this symbol; numbers smaller than 1 begin with a decimal separator. To display a leading zero displayed with fractional numbers, use zero as the first digit placeholder to the left of the decimal separator.

(%) - Percent placeholder. Converts the expression to a percentage. The percent character (%) is inserted in the position where it appears in the format string.

(,) - Thousand separator. The thousand separator separates thousands from hundreds within a number that has four or more places to the left of the decimal separator.

(:) - Time separator. The time separator separates hours, minutes, and seconds when time values are formatted.

(/) - Date separator. The date separator separates the day, month, and year when date values are formatted.

(E- E+ e- e+) - Scientific format. If the format expression contains at least one digit placeholder (0 or #) to the left of E-, E+, e-, or e+, the number is displayed in scientific format and E or e is inserted between the number and its exponent. The number of digit placeholders to the left determines the number of digits in the exponent. Use E- or e- to place a minus sign next to negative exponents. Use E+ or e+ to place a minus sign next to negative exponents and a plus sign next to positive exponents. You must also include digit placeholders to the right of this symbol to get correct formatting.

- + $ ( ) - Literal characters. These characters are displayed exactly as typed in the format string. To display a character other than one of those listed, precede it with a backslash (\) or enclose it in double quotation marks (" ").

(\) - Displays the next character in the format string. To display a character that has special meaning as a literal character, precede it with a backslash (\). The backslash itself isn't displayed. Using a backslash is the same as enclosing the next character in double quotation marks. To display a backslash, use two backslashes (\\). Examples of characters that can't be displayed as literal characters are the date-formatting and time-formatting characters (a, c, d, h, m, n, p, q, s, t, w, y, /, and :), the numeric-formatting characters (#, 0, %, E, e, comma, and period), and the string-formatting characters (@, &, <, >, and !).

("ABC") - Displays the string inside the double quotation marks (" "). To include a string in the style argument from within code, you must use Chr(34) to enclose the text (34 is the character code for a quotation mark (")).

Example: {variable1}=12345
{variable1}.formatnumber([##,###]) = 12,345

SUBSTRING - {var}.substring([arg1] [arg2])
   returns characters of {var} between index values arg1 and arg2.

LENGTH - {var}.length
  returns number of characters in {var}

ADD - {var}.add([arg1])
   {var} and arg1 are integers, add {var} and arg1

SUB - {var}.sub([arg1])
   {var} and arg1 are integers, subtract {var} and arg1

INDEXOF - {var}.indexof([arg1])
   returns starting position of character string arg1 in {var}
 example: {var} = "test@mail.com"
   {var}.indexof([@]) = 4

IFEQUALS
   {var}.ifequals([arg1] [arg2] [arg3])
    if {var} = "arg1" then "arg2" else "arg3"
      "arg3" is optional.

TRIM - {var}.trim
   removes leading and trailing spaces from {var}

TRANSLATE - {var}.translate([string default] [param list])
   returns the nth parameter in the [param list] counting from zero
   where n = {var}, if there is no match return string default.
  example: {var} = 3 then
          {var}.translate([] [zero] [one] [two] [three] [four] [five]) = "three"

URLENCODE - {var}.urlencode

URLDECODE - {var}.urldecode

HTMLENCODE - {var}.htmlencode

HTMLDECODE - {var}.htmldecode

NOBASEPATH - {action}.nobasepath
  Used with actions that need to be formatted as relative URLs.
  Example, when an action is included in a querystring.

CASUALNAME - {var}.casualname
   Generates a casual name (in most cases the first name)
   Rules include:
   1) Replace any underscore with a space.
   2) Delete any spaces before or after a dash.
   3) Strip any leading or trailing white space
   4) Skip any prefixes like MR, MS, MRS, MISS, DR, REV
   5) If name contains a comma then take the last word
   6) If name does not contain a comma then take the first word
   7) If the chosen name is only one character (not counting any periods) then use the full name.

   Some Examples of the Usage are:
    ("MR PETER_WENTOVICH JR") -> [Peter]
    ("K R_LANGSTON") -> [K R Langston]
    ("MR R_GRIMM") -> [R Grimm]
    ("MRS LINDA_GURGANUS") -> [Linda]
    ("MS SHERRY_GRAY") -> [Sherry]
    ("MISS SHERRY L_HILL") -> [Sherry]
    ("MISS KIM M_CIPOLLA") -> [Kim]
    ("MR KENNETH R_RAMEY JR") -> [Kenneth]
    ("JENA_ARGROVES") -> [Jena]
    ("DR SCOTT_AARONS") -> [Scott]
    ("REV JOSEPH W_KENSHOL") -> [Joseph]
    (" Allan J O'Driscoll") -> [Allan]
    ("A. O'Driscoll") -> [A. O'Driscoll]
    ("O'Driscoll, Allan ") -> [Allan]
    (" Golden, Jr., David ") -> [David]
    ("Mr O'Driscoll") -> [O'Driscoll]

LONGSTATE - {var}.longstate
   Translates postal state codes to their corresponding full English spelling.  Examples:
   "CA" -> California
    "IL" -> Illinois
   "NY" -> New York

     
© Alterian. All Rights Reserved. | Privacy Policy | Legal Notice