How to add a new line in formula?

Hello,

I want to send emails with the “Gmail: Send mail” button and split the content on multiple lines.
I have tried using the ‘\n’ character as well as its Unicode value with the Character(10) formula but without success… The entire content of the mail sits on the same line.

Thanks for help

I haven’t tinkered around with this a lot, but I have a couple of quick thoughts.

  1. you can add in the html tag
    to put a break in to your content, which would send the text to the next line.

  2. you can actually send an entire section in an email, so depending on exactly what you’re trying to send, you could just send the section as the email and I believe that it will format it exactly as the section is laid out.

ex:
the section
coda%20section

the email
coda%20email

so, just create a button on a different section and you can send away another section as a full email.

Hope this helps!

1 Like

Hi Antoine

The easiest way to ensure that newlines are preserved is by making sure that the content you are sending has formatting that can not be captured in plain text alone. For instance, if the content has bullets, or if it has bold, italics, underline etc.

If you don’t want any of the text to be bold, you can just bold a blank space which will look similar to plain text visually but under the covers will not be stored as plain text. The following example document sends an email that preserves the new line. This is because there is a blank space after the character ‘b’ which has been bolded.

We will work on making this easier so you don’t have to do these workarounds, but this should help you in the meanwhile.

Thanks
Himanshu

1 Like

Thanks for the tip, I didn’t know that sending whole sections by mail was possible :slight_smile:

1 Like

Thanks, it indeed works !
I’m still a beginner with the formula language so I don’t know how to fit all data of each line of my 3-column table in a bulleted list but I guess that I could sort it out with the formulaMap and bulletedList functions.

if I understand what you’re saying, you could make a 4th column and build a formula like this:
combine%20formula

then below the table it’s as easy as building the bulletedlist() formula:
combined%20result

Then when you’re all done you can just hide column 4 and it’s like it doesn’t even exist!

I also just went ahead and tried your formulamap() idea and that actually worked really well!
formulamap%20bulleted%20list

Basically, coda is awesome - glad you’re enjoying it!

1 Like

Awesome ! With the addition of a Filter() it works just like I wanted, even though I’m sending sort of an invoicing by mail, so I was concerned about its feasibility at start :slight_smile:

For the record, I’m sending a selected list of lines of a table with 3-columns by mail with the following formula as the content of the mail :
FormulaMap([Combining].filter([ShouldSendColumn]=true), Person + " " + Verb + " the " + Thing + ".").bulletedList()
The summary (last line of the table) had to be written in the subject of the mail, though.

1 Like

Character(10) worked for me

concat("Meeting Notes Added",Character(10),"Action Items:\n",[Meeting Notes].Filter(Date= Today()).[Action Items],"")
5 Likes

thanks…I was simply looking for line change operation like this