Using the \n formula in Airtable
  • 05 Mar 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Using the \n formula in Airtable

  • Dark
    Light
  • PDF

Article summary

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.

Plan availability

All plan types 

Platform(s)

Web/Browser, Mac app, and Windows app

Related reading

Note

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

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:

{Role / Title} & " " & {Department} & " " & {Experience Required} & " " & {Description}

Screen_Shot_2020-01-13_at_2.29.10_PM.png

For a more readable job description field, we can adjust the formula to use "\n" to insert line breaks in the right places.

{Role} & "\n" & {Department} & "\n" & {Experience Required} & "\n \n" & {Description}

Screen_Shot_2020-01-13_at_3.06.04_PM.png

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.

"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 that 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.

example.png

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")


Was this article helpful?