I have mutliple comments per record ID like this:
and I would like to merge them into a single value with line breaks like this:
How would I do this?
Thank you.
Solved! Go to Solution.
Jimmy,
You would use a summarize tool and then a formula. The summarize is a concatenation function and the formula is a regular expression. I've included a working module for you to examine.
Thanks,
Mark
Interesting use case.
I was able to do this with the Summarize tool...
Group by the ID, and Concatenate the Comment using "\n" (New Line) as the Separator.
It shows up in a Browse after that as being in two lines, but not sure about then when you output it. I've tried outputting to Excel (which is what it looks like you are wanting) and Excel doesn't seem to recognize the embedded new line.
Maybe someone else can add to this?
Mark,
Most don't realize you can insert many different separators in the Summarize Concatenate parameters, so that would eliminate your Formula tool.
However, I'm still not getting it to output to Excel where it recognizes the new line.
Any ideas on how we might get that to work?
Rod
Thanks for the tip on the \n separator!
When I output my module to a .xlsx worksheet I agree that the contents appear to be FLAT. But after I double clicked a cell to look at it, It becomes multiple rows. At this point it becomes an Excel question.
Ah...didn't notice that effect in Excel when you double-click.
So Alteryx IS sending the new line character to Excel, and agree...it now becomes an Excel question.
Thanks.
Mark/Rod,
Thanks for your replies. I need to be careful of the separator as these comments contain all sorts of characters, some even contain line breaks. So I'll need to test these. Thank you! -Jimmy
also this will not be going into Excel, it will be imported into Salesforce.
to wrap up, I am going to use <br> as my separator as this will be going into an html field within Salesforce. Thank you both for your help!