Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Using a [Field] in an Email Body Text and maintain the line breaks

BautistaC888
8 - Asteroid

Hello,

I need to use a field to use as a body for an email.
The mail body needs to conserve the line breaks from the body.

Thank you.

8 REPLIES 8
PhilipMannering
16 - Nebula
16 - Nebula

If the body is static you could just paste that into the Report Text Tool? As opposed it coming from a Text Input Tool...

 

PhilipMannering_0-1653340449990.png

 

BautistaC888
8 - Asteroid

Hello,
Unfortunately, the body is dynamic. That is why i want to take it from a field. 

PhilipMannering
16 - Nebula
16 - Nebula

Can you share two different examples of the body?

BautistaC888
8 - Asteroid

Ok, but it's not a fixed number of body.

FreeRangeDingo
11 - Bolide
11 - Bolide
PhilipMannering
16 - Nebula
16 - Nebula

Ah, so the whole body could change.

 

A couple of options worth trying,

1. Use the field directly in the Email Tool (i.e. without the Report Text Tool)

2. Replace new lines with <br/> in a Formula Tool and then use the field but treat as raw PCXML (example attached)

PhilipMannering_0-1653342855074.png

 

FreeRangeDingo
11 - Bolide
11 - Bolide

Then the Text column feeds into the Email tool as the body.  That works nicely.

FreeRangeDingo
11 - Bolide
11 - Bolide

Actually, you don't need the Report Text tool.  I liked this and was going to do a write up on it.  When I started building it out, I was able to get a good clean email without Report text and just using the expression.  Here are my inputs.

FreeRangeDingo_0-1653348981526.png

Here are the formulas.

FreeRangeDingo_1-1653349009356.png

 

And here is the email that comes out.

FreeRangeDingo_2-1653349028952.png

 

 

Labels
Top Solution Authors