Skip to main content
Question

Line Breaks in Multiple Fields


cp_creative

I’m working on a Zap that take the output of a long Microsoft Form and sends it to PDF Monkey. A bunch of the questions are long-answer with the potential for line breaks, and I’d like to convert those line breaks (“/n”) to html <br> tags. I know I can us the Formatter, but as far as I can tell, I have to do a formatter for each potential field in the Excel Spreadsheet the form dumps the responses into (the actual zap pulls form the spreadsheet, with the ”new row” trigger) 

I’d really love a simple to way to do the same replace function on every column/cell/field in the new row, without having to set up a bunch of separate Formatters for each column/cell/field or having to specify each column/cell/field in a Code zap or similar (I’ve seen some things when searching about converting it to Line Items, but that won't work in my case as it requires comma-separated values and the paragraphs I’m wanting to format would have commas inside them).

Is this doable?

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Troy Tessalone
Forum|alt.badge.img+14

Hi @cp_creative 

Good question.

1 Code step can be used.

https://zapier.com/apps/code/help


cp_creative
  • Author
  • Beginner
  • 1 reply
  • August 21, 2023

@Troy Tessalone yeh, I saw that pop up as well (and a JS script that would do what I want), but I couldn’t figure out how to have it target all the column/cell/field in my incoming spreadsheet data. Do I just leave the “input data” part blank, or do I have to specify each column/cell/field in a specific way (which is what I’m trying to avoid, but ne code block is doable, I just don’t know how to use that “input data” section)

 

 
 

Troy Tessalone
Forum|alt.badge.img+14

@cp_creative 

You would need to create an Input Data variable for each desired field you want to run the replace function.

 


Troy Tessalone
Forum|alt.badge.img+14