@NewLine (Formula Language)

Inserts a new line (carriage return) into a text string.

Syntax

@NewLine

Return value

carriageReturn

Text. A carriage return.

Usage

On the Web, this function does not work in selection, form, or window title formulas.

In Notes®, this function does not work in selection, hide-when, column, window title, form formulas, or inside of @Prompt.

If you need to insert a carriage return inside an @Prompt formula, see @Char.

Tip: To add multiple lines to a single column row:
  1. In the View Properties box:
    • Change the Lines per row to the number of carriage returns you want to include in the row.
    • Select Shrink rows to content.
  2. In the Column Properties box:
    • Choose New Line as the Multi-value separator.
    • Deselect the Show multiple values as separate entries check box.
  3. In the code for the column formula, specify each string or number that you want to display on a new line as a separate value. Since you set the Multi-value separator to New Line, this inserts a carriage return between each value. For example, the following column formula vertically lists the content of the FirstName field preceding the content of the LastName field in the column row:
    first:= FirstName;
    last := LastName;
    @Trim(first : last)

Examples

  1. This returns

    Hi There

    "Hi"+@NewLine+"There"
  2. This returns

    Foster, Steven

    in the EmpName field if the string in the LastName field is Foster, and the string in the field named FirstName is Steven.

    FIELD EmpName:= LastName + "," + @NewLine + FirstName;
  3. This input translation formula uses @Newline to replace all occurrences of "%" with a carriage return. If the description field contains "Here we are now%Entertain us," the formula translates it to:

    Here we are now Entertain us

    @Implode(@Explode(description; "%"); @NewLine)