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

Alteryx Designer Desktop Discussions

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

Working with (wanted) line breaks and the Table > Email tools

Scott_Snowman
10 - Fireball

I have a workflow that pulls from SharePoint, slices into various pieces based on project owner and status, and mails out separate tables based on the project owner's email address. No problem there.

 

The issue is the formatting of the table. As noted in LisaL's comment here the Email tool does not play well with new lines in data.

 

Here's how the data flows in from Sharepoint. The "Running Update Detail" field has new lines inserted.

 

Project IDProject Start DateLast Updated DateStatusRunning Update Detail
54A10-30-1710-31-17Pending parts

10/30: Dispatch requested review of functionality. Approved by Scheduling.

10/31: Dispatched agent reported that part code #34B1-LL/A was not functioning and needed to be re-ordered

23B10-24-1710-27-17Pending Scheduling approval

10/24: Dispatch requested review of functionality.

10/24: Due to remote location, Scheduling requested extension of project timeline

10/27: Approval from finance to extend project parameters

 

I can see that Alteryx recognizes the new lines because it does flag them in the Results panes.

 

However when the data is emailed out through Alteryx, the following occurs.

 

Running Update Detail

10/30: Dispatch requested review of functionality. Approved by Scheduling. 10/31: Dispatched agent reported that part code #34B1-LL/A was not functioning and needed to be re-ordered

10/24: Dispatch requested review of functionality. 10/24: Due to remote location, Scheduling requested extension of project timeline 10/27: Approval from finance to extend project parameters

 

Since there could be multiple lines of data flowing in per cell, I don't want to split apart into unique fields as in the linked solution because I don't know how many fields I'll need. (And I'm not aware of a "futureproof" method to do it easily if there is one.)

 

Is there a way to either:

 

  • Maintain the new line formatting in the email output,
  • Selectively bold the dates that separate updates so they're easier to spot, or
  • Another way to split out the data so it's visually easy to separate?
33 REPLIES 33
patrick_digan
17 - Castor
17 - Castor

@Prasanna921 Perhaps there is a better way to do this, but I 1) connected the Table tool directly to the render tool to set it up and choose the right field. 2) Disconnected the table tool and reconnected the formula tool to the render. 

 

The render tool says the "Table" field is a bad Field Type but it appears to work. 

bccpwc
7 - Meteor

@patrick_digan Thank you! this worked for me... and it came at just the right time :)

 

Prasanna921
7 - Meteor

Can you please post your workflow or screenshots that would be very helpful ?

patrick_digan
17 - Castor
17 - Castor

@Prasanna921 The workflow was attached to my previous message, let me know if you have any troubles. Here is a picture where the "Table" field is selected although is complaining about it. It runs without error. 

 

Capture.PNG

Prasanna921
7 - Meteor

@patrick_digan I am getting an error msg (Found a Bug while replicating data), when I try to work with large data set. I am attaching my flow and data file. Could you please help me.

 

Thanks in advance.

patrick_digan
17 - Castor
17 - Castor

@Prasanna921 It seems to be having an issue when multiple line breaks are in a row. Do you need multiple line breaks? If not, you can change the first formula to 

REGEX_Replace([Running Update Detail],"(\n)+","<br />")

If you need multiple line breaks, I'm not sure how to do this...

Prasanna921
7 - Meteor

@Patrick_digan  This works for me. Thanks..!

srinukindia
5 - Atom

@patrick_digan.. I have been waiting for such a fantabulous solution for for a similar issue for over 2 weeks. Thank You so much for the solution. It is working for me.

joshuaburkhow
ACE Emeritus
ACE Emeritus

So we ran into a very similar use case but we did have luck instead of running directly out of the formula to the render we put in a Report text tool and it works marvelously! 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
SriSampath
5 - Atom

Thank you, this solution really worked for me and saved me a lot of trouble

Labels