Using the \n formula in Airtable

Prev Next

Plan availability

All plan types

Permissions

  • Owner /Creator - Have access to all field configuration options. Additionally everything editors, commenters, or read-only users can do.

  • Editor - Can sort by, filter by, group by, or hide the field within a view.

  • Commenter / Read-only - Copy a field's URL

Platform(s)

Web/Browser, Mac app, and Windows app

Note

To see multiple lines show up in Airtable records make sure the row height is set to medium or larger.

Adding line breaks to formula outputs

When working with formulas, especially when combining several fields of information, it is often helpful to program in line breaks and other formatting features to better display a formula's result. You can add in-line breaks as needed by using \n  in a formula.

For example, you may want to combine the fields shown below to produce a paragraph of text for a job description. A formula that only combines each field would result in this:

CONCATENATE({Role / Title}, " ", {Department}, " ", {Experience Required}, " ", {Description})

An image showing a formula output without new line breaks.

This results in a very hard to read formatting. For a more readable job description field, we can adjust the formula to use \n to insert line breaks in the right places.

CONCATENATE({Role}, "\n", {Department}, "\n", {Experience Required}, "\n \n", {Description})

An image showing a job description output with new lines adding to the output of the formula.

With the added line breaks, the job description becomes easier to read and to copy and paste into other places like an online job board. To go one step further, you can even add custom text to the job description to add more context.

CONCATENATE("Job Title: " & {Role}, "\n", "Department: ", {Department}, "\n" , "Number of years experience required: ",  {Experience Required}, "\n \n", "Job Description: ", "\n", {Description})

Screen_Shot_2020-01-13_at_3.11.32_PM.png

Note

The result of this formula will display when viewing the field in the grid view or in an expanded record. In other views like the gallery and kanban view, we currently only display one line of text from the result of a formula.

FAQs

Can I add line breaks within a rollup field?

Yes. You can use a formula like the following in the aggregation formula section of a rollup field: ARRAYJOIN(values, "\n")