Line breaks in longtext: what is and isn't possible?

I’m looking for a reality check on whether I have understood the following.

It seems I can do these operations with line breaks/newlines:

  • Enter data containing line breaks in a longtext field

  • Display longtext data containing line breaks in a text widget in a card

  • Accept data containing line breaks in a longtext field in a form

  • Export data containing line breaks in a longtext field in an Excel file

But apparently I can’t do any of the following:

  • I can’t import text data containing line breaks in Excel (can’t import to longtext at all)

  • I can’t use a longtext field in a function and have line breaks persist (e.g., the CONCATENATE() function turns line breaks to spaces)

  • I can’t represent line breaks in a string literal (i.e., “\n” or some other common convention) (I guess this is a corollary to the above)

Did I get that right?

My use case: I have an urgent need to import legacy data containing line breaks. (I also would like to use functions to combine multiple form submission data fields into nicely formatted longtexts containing embedded blank lines, but that’s not mission critical.)

If there are any tricks to get around these limitations I’d love to hear about them. I’m investigating the General Caster integration. Are there others?

I realize this is an older post, but I stumbled across it as I was trying to import an excel file that includes a “notes” column that can be very long. Having to add these manually would be very time consuming and when I went to import the data I found the long text column isn’t supported for imports. I decided to change the long text column in my board to a regular text column and to my delight it actually worked! It didn’t populate at first and I figured it wasn’t going to, but after a minute or 2 I refreshed my screen and the text appeared. Now I’m going to create an automation to add the info in that column as an item update so I can just delete the text column in my board. Hope this is helpful to someone! :slight_smile:

Here is how we accomplished this:

  1. Set up your board with the following columns:
  • a long text column where you want the data to end up,
  • an interim long text column to use for formulas,
  • and a normal text column for every line you want entered into the long text column.
  • Create a status column for triggering the automation that includes the stages of start, working, done.
  1. Create an automation that is triggered when the status is changed to “start.”
  2. The automation performs the following steps:
  • Change the status to “working.”
  • Use General Caster to perform a formula to check if the long text column has data in it or not. If it does, cast that result to our interim long text column with a line break at the end using CHAR(10).
  • Use General Caster to combine the interim long text and the import short text columns and cast that back to our long text column.
  • Clear the interim long text column.
  • Set the import status column to “done.”

We have an automation created for each line we want to implement this for so that we can import several lines into a single long text field. We use the same status column for triggering these automations and just turn them on or off depending on which line we want to insert/add to the long text field.

Wish there was a simpler way (i.e. being able to import to long text fields) but for now this is working.

@riddle Did you ever find a solution? I would like to use line breaks in a formula column with the CONCATENATE-function or with General Caster.

At MONDAY: Adding a CHAR() function to the available function list would help this in broader sense.