Line breaks for DocsAutomator

A DocsAutomator user wants to add text and separate items with line breaks. The text needs to be dynamic: Depending on the availability of data, it can be any number of items up to 10.

How would you approach this? Using a rich text field, line breaks are preserved, but I don’t know how to construct the text dynamically. I’ve tried \n in joined lists, if else fields etc., but \n seems to get escaped. I do have a working version with JSON and \n, but also don’t know how to construct it dynamically.

Would love someone’s help on this! :folded_hands:

Can you use a Joined List with a carriage return (Enter key) as the separator? I seem to remember something with two spaces and a carriage return working better in some cases. Or do you except html, so maybe using <br> or <p>?

I think carriage return should work, or you can use br for HTML.

In Glide, if you know in advance how many characters you want to repeat, there’s a “repeat text” column.

So it goes like:

  • Original column with something like {blockOfLineBreaks}.
  • Repeat text column to repeat as many line breaks as needed.
  • Template column to replace {blockOfLineBreaks} with the repeat text value.
1 Like