โ10-12-2023 02:03 PM - edited โ10-12-2023 02:07 PM
I am reading 1 text field from a SQL Server select rows and want to send them in an email. Currently, it puts all the records on one line, but I want each record on a new line. Any suggestions ? I tried to force a "New line" break, but no luck.
See Screen-shots and result data (3 records sample) below.
Instead of this
10/11/2023 10:16 Jones, Mary, Computer Room , 10/11/2023 10:54 Smith, Frank, Computer Room , 10/11/2023 15:56 Amos, Henry, Computer Room
I want
10/11/2023 10:16 Jones, Mary, Computer Room
10/11/2023 10:54 Smith, Frank, Computer Room
10/11/2023 15:56 Amos, Henry, Computer Room
Solved! Go to Solution.
โ10-12-2023 03:04 PM - edited โ10-12-2023 03:08 PM
Thanks. I think the output is correct when I do this:
But after the next step to send the email
I get this error.
Also, It looks like I can "trick" it into making a 2 dimensional array by PLUCKing a blank instead of a 2nd field, but it puts a comma off to the right to separate the imaginary 2nd blank field from valid field 1
P.S. Thanks for all your help the last few days !
โ10-12-2023 05:24 PM
D'oh! My bad. Try this:
[rows].pluck('output').join('\n')
โ10-13-2023 06:55 AM - edited โ10-13-2023 06:58 AM
it treats the '\n' as a character string, not a line break. Do I need square brackets [ ] or something to code it as a line break ?
โ10-13-2023 08:04 AM
In the Outlook action, is the body format set to text or HTML? "\n" should work if it's set to text.
If it's HTML, you'll need this:
[rows].pluck('output').join('<br>')
โ10-13-2023 10:09 AM
Thanks. <br> with HTML worked.