Runtime verified Test scripts included

Syntax

Uppercase(sourceString)  →  string
1 argument — exactly

Parameters

Name Type Required Description
sourceString string | number | date Yes Value to convert

Example

%%[
  VAR @shout
  SET @shout = Uppercase("Hello World")
]%%
%%=v(@shout)=%%

Renders HELLO WORLD.

Typical use is a country or currency code that has to render consistently regardless of how it was stored:

%%[
  VAR @country
  SET @country = Uppercase(AttributeValue("CountryCode"))
]%%

Return value

string — the value converted to upper case.

The result is arbitrary transformed text, so there is no closed set of sentinel values to test for.

Behaviour

Letters are uppercased, everything else is left alone. A mixed-case string containing digits and punctuation came back with only the letters changed.

An empty string returns an empty string.

Accented lowercase letters map to their accented capital form. The lowercase accented vowels 224, 233, 238, 245 and 252 came back as 192, 201, 206, 213 and 220.

Casing is culture-invariant, not Turkish. The dotless i (codepoint 305) uppercases to the plain ASCII I (73), not to the dotted capital a Turkish locale would produce.

Numbers are returned unchanged. Uppercase(12345) gives 12345.

Date values are stringified, then uppercased. Uppercase(Now()) returned HTTP 200 with the formatted date; the matching Lowercase call rendered the same meridiem as am, confirming the transformation really ran.

Booleans are swallowed silently. Uppercase(false) returns HTTP 200 with an empty result. Nothing coherent about the boolean survives, so this is a rejection rather than boolean support and the parameter type stays string | number | date. See Differs from official docs.

The German sharp s is not expanded

Uppercasing a six-letter German word containing the sharp s returned the codepoints 83, 84, 82, 65, 223, 69 — the sharp s (223) sat unchanged between the surrounding capitals. The result is still six characters, not the seven a caller expecting an SS expansion would get, so Length of the result is unchanged as well.

This is a specific gap rather than non-ASCII input being ignored wholesale: the accented vowels in the same sweep were mapped correctly. The official reference makes no claim about the sharp s, so this is undocumented behaviour rather than a contradiction. It is catalogued on Differs from official docs.

Show test script
%%[
  VAR @b
  SET @b = RequestParameter("b")

  /* safe sweep: ASCII letters change, digits and punctuation do not */
  IF @b == "safe" THEN
    OutputLine(Concat("UP1=[", Uppercase("HeLLo123!@#"), "]"))
  ENDIF

  /* empty string */
  IF @b == "empty" THEN
    OutputLine(Concat("UPE=[", Uppercase(""), "]"))
  ENDIF

  /* the sharp s survives verbatim; accented letters do map */
  IF @b == "nau" THEN
    OutputLine(Concat("NAU_ECHO_SS=[", "Straße", "]"))
    OutputLine(Concat("NAU_UP_SS=[", Uppercase("Straße"), "]"))
    OutputLine(Concat("NAU_ECHO_CAFE=[", "café", "]"))
    OutputLine(Concat("NAU_UP_CAFE=[", Uppercase("café"), "]"))
    OutputLine(Concat("NAU_ECHO_ACC=[", "àéîõü", "]"))
    OutputLine(Concat("NAU_UP_ACC=[", Uppercase("àéîõü"), "]"))
  ENDIF

  /* invariant, not Turkish: the dotless i becomes a plain ASCII I */
  IF @b == "tr" THEN
    OutputLine(Concat("TR_ECHO_DOTLESS=[", "ı", "]"))
    OutputLine(Concat("TR_UP_DOTLESS=[", Uppercase("ı"), "]"))
    OutputLine(Concat("TR_UP_i=[", Uppercase("i"), "]"))
  ENDIF

  /* numbers pass through unchanged */
  IF @b == "un" THEN
    OutputLine(Concat("UN=[", Uppercase(12345), "]"))
  ENDIF

  /* date is stringified then processed */
  IF @b == "ud" THEN
    OutputLine(Concat("UD=[", Uppercase(Now()), "]"))
  ENDIF

  /* boolean: HTTP 200 but nothing renders between the brackets */
  IF @b == "ub" THEN
    OutputLine(Concat("UB=[", Uppercase(false), "]"))
  ENDIF

  /* each arity branch aborts the page: the start marker never renders */
  IF @b == "u0" THEN
    OutputLine(Concat("--- u0 start ---"))
    OutputLine(Concat("U0=[", Uppercase(), "]"))
  ENDIF

  IF @b == "u2" THEN
    OutputLine(Concat("--- u2 start ---"))
    OutputLine(Concat("U2=[", Uppercase("a", "b"), "]"))
  ENDIF
]%%

Availability

Platform Available
Marketing Cloud Engagement Yes
Marketing Cloud Next Yes, from API 67.0

See also