Carriage Returns in CONCATENATE


#1

Add the ability to use a carriage return when using the CONCATENATE function.

Name&CarriageReturn&Street&CarriageReturn&State&","&Zip


#2

Hi Ron,

Thanks for your question! As we noted in email, we do not currently support carriage returns in formulas. We apologize for any inconveniences this may cause for you and other users.


#3

That’s why I posted here to the Feature Request forum.


#4

Hi Ron,

Thanks for doing so! I added a message to make it clear for other users that we do not currently offer this feature. Please feel free to let us know if you have any other requests or feedback!

Thanks,

Victoria


#6

This would be a GREAT feature for me also. Thanks!


#7

Yes, i would love this feature too!!!


#8

Absolutely needed/required for CONCATENATE function.


String manipulation
#9

Great feature to add!


#10

yes please, I want this, too!


#11

Here’s a way to use carriage returns with the CONCATENATE function:

  1. Add a Long Text column to your table. I name it “CR” so that it is easy to recognize.

  2. Click into the field, press return, and add the text “[CR]” (without the quotes) to the second line. Be sure to set the value for every row in the table. (You can “fill down” to do this.)

  3. Add a Formula field that concatenates your fields, and place the CR field where you need it. Wrap the CONCATENATE function with the SUBSTITUTE() function, so that the “[CR]” value is replaced with an empty string. For example: SUBSTITUTE(CONCATENATE(Name, CR, {Street 1}, CR, {Street 2}, CR, City, ", ", State, " ", Zip), “[CR]”, “”)

In Airtable, the Formula field will appear to be “flat” (as if there are no carriage returns in it). However, if you copy and paste the field into another application, or if you export the table, you should see that the carriage returns are actually there.

Attached are a few screen shots that might help explain the technique. If you need me to clarify anything, let me know.

I hope this helps.

~ Tim

The “CR” field:

The Formula field:


#12

You can simply use “\n”. Like this:
CONCATENATE({Name}, “\n”, {Attachments})

It will work.


#13

I tried this but, at least within the field display itself, I don’t see any carriage returns. Is this only for export?
I am using a formula like this:
CONCATENATE( Name,"\n",{Address 1},{Address 2},"\n",City)
Thanks,


#14

@Daniel_Robbins Have you tried copying from the cell in the grid view? It worked for me.

I will show exactly the answer:

“Name
{Address 1}{Address 2}
City”


#15

Yes, I noticed that on paste the carriage returns are there. I wish they’d show up in the cell too…

  • Dan

#16

They don’t show up because formula fields are treated as single line fields. I think we should be able to generate a formula for any kind of field we like.


#17

Any way to remove the quotes from the output? Can’t think of one myself…


#18

Thanks, that’s super helpful!


#19

Hello all, I’m happy to report that the carriage returns display as expected if you increase row height.

Unfortunately though, the resulting copy block is still wrapped in quotes once copied and pasted. Has anyone worked out a way to omit those quotes?!


#20

Nope — but here are a few additional points about them

  • Actually, you can bypass the quotes: If, instead of copying the entire cell, you mark-and-copy the cell contents, the resulting text is pasted without enclosing quotes, even if the copied text contains embedded commas or newlines. You truly do have to mark-and-copy — as in click and drag — as pressing Ctrl-A marks the entire page, even if you have the expanded field open and selected. Obviously, not really a work-around, but may be useful if only occasionally needed.

  • The enclosing quotes are only obvious if you copy from Airtable and paste to another app; however, they are included in a paste to another Airtable cell, and they affect how the pasted data is interpreted:

    • Pasting a value containing an embedded newline without enclosing quotes — that is, one copied using mark-and-copy — into either a single-line text or a long text field will paste only the text up to the newline in the current cell, with text following the newline (presumably up to the end of the file or the next newline encountered) appearing in the cell below the current one. If there are insufficient rows, Airtable will prompt to confirm the user wishes to add records.
    • Pasting a value containing an embedded newline with enclosing quotes — as when the entire cell is copied — into either a single-line or a long text field pastes the entire value into the current cell.

#21

@W_Vann_Hall This is a REALLY helpful explanation, thank you! A keyboard-only solution is ideal, but we’ll look at drag-and-drop.