AMPscript OutputLine (Next)
AMPscript OutputLine in Marketing Cloud Next. Behaviour proven in a Marketing Cloud Next email: a literal or variable argument renders only a line break, and a nested function call is rejected at save.
Syntax
OutputLine(value) → void
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value |
string | number | variable | Yes | Literal or variable; its value is not written, only the line break |
Next refuses to save an email where the argument is a function call, such as OutputLine(Concat("A")), and an email where the argument is missing. Calls with several literal arguments were not tested.
Example
%%[ OutputLine("ignored") ]%%
Renders a line break and nothing else.
To write a value into a Next email, use v instead:
%%[ SET @word = "zeta" ]%%
%%=v(@word)=%%
Renders zeta.
Return value
void — nothing is returned.
Behaviour
Only the line break is written. OutputLine("bare"), OutputLine(@word) with @word set to "vee", and OutputLine(456) each render a line break with no text.
A nested function call is rejected at save. An email containing OutputLine(Concat("A")) cannot be saved: the content API answers HTTP 400 with “The AMPscript syntax isn’t valid”, pointing at the call. The same happens with two or three nested calls as arguments, and with two OutputLine(Concat(...)) calls in a row.
An empty call is rejected at save. OutputLine() gives the same HTTP 400.
It cannot be nested. Concat("x", OutputLine(Concat("A")), "y") is rejected at save as well.
Show Next test script
<!-- Marketing Cloud Next test script for OutputLine. Paste it into the HTML component of a
Next email and open the preview. Each line prints the result Next gave when the call
was rendered on its own (expect) next to the result of this run (got).
Assembled from single-call test emails (dates on the page); it has not been
run as one email. Calls that make Next fail are listed separately. -->
<p>c1 expect=[U+000A] got=[%%[ OutputLine("bare") ]%%]</p>
<p>c2 expect=[U+000A] got=[%%[ SET @r2olv = "vee" OutputLine(@r2olv) ]%%]</p>
<p>c3 expect=[U+000A] got=[%%[ OutputLine(456) ]%%]</p>
Show calls that fail in Next (one email each)
<!-- Run each call below in its own Next email: one of them in a combined email
would stop the whole preview or block the save. -->
<!-- email 1: expect that the save is rejected (HTTP 400) -->
%%[ OutputLine(Concat("A")) ]%%
<!-- email 2: expect that the save is rejected (HTTP 400) -->
%%[ OutputLine() ]%%
<!-- email 3: expect that the save is rejected (HTTP 400) -->
%%[ OutputLine(Concat("a"),Concat("b")) ]%%
<!-- email 4: expect that the save is rejected (HTTP 400) -->
%%[ OutputLine(Concat("a"),Concat("b"),Concat("c")) ]%%
<!-- email 5: expect that the save is rejected (HTTP 400) -->
%%[ OutputLine(Concat("P")) OutputLine(Concat("Q")) ]%%
<!-- email 6: expect that the save is rejected (HTTP 400) -->
%%=Concat("x",OutputLine(Concat("A")),"y")=%%
Differs from official docs
- The documented argument is rejected and other arguments write only a line break. The docs require a function call as the argument and promise a CRLF line break after the value. In Next an email with
OutputLine(Concat("A"))cannot be saved, and a literal or variable argument writes a bare line feed without the value. Card
Availability & differences
| Platform | Available |
|---|---|
| Marketing Cloud Engagement | Yes |
| Marketing Cloud Next | Yes, from API 67.0, with a literal or variable argument only |
In Engagement the argument is a function call, so OutputLine(Concat("A")) writes A and a line break, and OutputLine() writes just the break. Next rejects both of those emails at save; it accepts only a literal or variable argument, and then writes only the line break. Compared 2026-11-23 by rendering the same calls in a Marketing Cloud Next email.
See also
- v — writes a value inline in a Next email
- Output — the same without the line break
- Official reference