Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Email Tool: how to add field value to body

jason_scarlett
10 - Fireball

Is it possible to use a field value in the body section of the email tool?

 

e.g.

Hi [name],

There were [final_count] patients this past week. Click here [URL_link] to follow up.

Cheers

10 REPLIES 10
JoeM
Alteryx Alumni (Retired)

My recommendation would be to use a formula tool to assemble your message within a single field. After building out the message, set up the body of your email tool to use the message field.

jason_scarlett
10 - Fireball

That will work, but how do I insert line breaks?

I tried "\n" but that didn't work.

KaneG
Alteryx Alumni (Retired)

Hi Jason,

 

Tbh, there is probably an easier way, but I just use the tilde or something similar (be careful using pipes as an idenitfier for REGEX) and then afterwards run REGEX_Replace([Field],'~','\n')

 

Kane

jason_scarlett
10 - Fireball

I used a formula tool to "calculate" the email body, then I use a second formula tool to replace the ~'s with /n ... but the email still doesn't have any line feeds.

It does look as though the ~'s have been replaced corerctly when I browse the field with teh browse tool.

 

I also thought about building the email up in html format .. but as soon as I put </> tags the email doesn't send.

 

JoeM
Alteryx Alumni (Retired)

@jason_scarlett

Knowing that you need some sort of formatting, I would point you away from the formula tool and towards the report text tool. Once you build the text field, you can drop that into your email.

 

 

Configuration:

email2.png

 

Result:

email.png

jason_scarlett
10 - Fireball

Great, this is a very flexible way to do this.

 

I would like to encourage the Alteryx team to aim to have an 'Open Example' for every tool available ... this from my perspective make learnign much easier.

TaraM
Alteryx Alumni (Retired)

@jason_scarlett wrote:

Great, this is a very flexible way to do this.

 

I would like to encourage the Alteryx team to aim to have an 'Open Example' for every tool available ... this from my perspective make learnign much easier.


 

@jason_scarlett - that's the plan! We keep adding more with every release.

Tara McCoy
rpaugh
11 - Bolide

This works for fields, but not links or layouts. I created a layout (also tried the table tool) to put records in new rows, each row containing a link, and got the following result:

 

<table width="100%" cellspacing="0px" cellpadding="0px" rowsContained="2" style=""><tbody><tr><td style="vertical-align:top;"><div class="DefaultText" style="width:100%;"><a href="https://cs41.salesforce.com/0015500000HnKzGAAV" >Organization Name 1</a><div><nbsp/></div></div></td></tr><tr><td style="vertical-align:top;"><div class="DefaultText" style="width:100%;"><a href="https://cs41.salesforce.com/0015500000HbkB4AAJ" >Organization Name 2</a><div><nbsp/></div></div></td></tr></tbody></table>

 

Instead of rendering the HTML in the result, the Report Text tool reads it as literal text.  This is what it should be showing:

 

Organization Name 1

Organization Name 2

 

How do you get the output to interpret this as HTML rather than plain text?

brianscott
11 - Bolide
Labels