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 ID | Project Start Date | Last Updated Date | Status | Running Update Detail |
54A | 10-30-17 | 10-31-17 | Pending 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 |
23B | 10-24-17 | 10-27-17 | Pending 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:
Solved! Go to Solution.
Hello Scott,
I am trying to use @Patrick_dup_239's workflow too without success. My flow is a little different in that each email will have person specific text and table (related to that person) attached as part of the body. So I landed up creating a table with the email of each person, related table and Body of email via a formula. I tried to convert the body of the email into a table with line breaks as suggested but its not working.
Here is my workflow. Can you tell me what I am doing wrong?
Thanks!
Deepa
Hello,
Would you please help me understand the the bold underline thing you have added. What does that $1 indicate and also why the bold and undeline command is ended with a colon
@sanyajaleel Both the $1 and the : are parts of the Regex_Replace command to replace text.
The $1 represents the string I am capturing in the pattern, which is a date.
The colon is just the colon character as it exists in the original text, it is not a reserved character in this case.
So the expression is fulfilling the request, "Look for a string formatted as a date and followed by a colon, and replace it with the same string wrapped in <b> and <u> tags followed by a colon."
Using the colon in both the capture and replace parameters was necessary to help make sure that only dates followed by colons would get the bold and underline treatment. As a result, a date in the middle of a sentence would not be targeted this way.
@sanyajaleel my code is specific to the RegEx pattern of looking for a date followed by a colon.
If you are looking to bold and underline the phrase 2-3 days then you need a different RegEx pattern. If it's always a number, a dash, and another number followed by a space and then the word "days" then this should work:
Regex_Replace([text], "(\d+\-\d+\sdays)", "<b><u>$1</b></u>")
I'm attempting to use this solution and having difficulty doing so. I have a workflow that documents all formulas used in a target workflow, and I want to preserve any newlines entered in the formulas (which are usually for readability). However, when I run the data into a table tool, it's forced onto a single line. When I tried to apply the Regex_Replace solution presented here, it simply folded in the <br /> tag as if it were perfectly normal text, both in Browse and in the finished Render, as seen in the third row here:
Has an update broken this functionality? All I want is to have these newlines be present in the Excel sheet that I'm generating.
Hi Joshua, it works perfect for V-String, but failed on V-WString. V-WString will get some characters like "应收账款".
Appreciated if you have any solution.
Thanks @patrick_digan - This solution really worked.
The browse after the table tool no longer shows results, but it does come out fine after the render tool. Hopefully this helps anyone else trying to implement this work around.
Hi Patrick,
Thank you for posting super formula for line break in E-mail tool, Request you to advise increase/ decrease the font size aswell
Hi
I had the same issue. This helps a lot