I have a comment column that can contain 0 or more comments within the single field. The comments within one record are pipe delimited. Each comment follows a structure of "date (name) - comment". I need to figure out which comments are valid depending on whether the name contains "ADMIN" and then display the comment text only along with the pipe deliminater. I cant figure out how to accomplish this in Aleryx. I've thought of iterative macros and regular expressions but cant come up with a clean solution. Below is an example of input and expected output. Is this possible?
input | output |
05/16/2018 12:33 PM EDT -(USER) Canceled. |10/26/2018 07:28 PM EDT - (LOCPADMIN) this is an admin comment1 |10/27/2018 07:28 PM EDT - (LOCPADMIN) this is an admin comment2 |10/30/2018 07:28 PM EDT - (LBDADMIN) This is an admin comment3| | this is an admin comment1 | this is an admin comment2 | This is an admin comment3| |
04/25/2018 12:06 PM EDT - (BOBB) Alphabet soup is delicious| | |
10/26/2018 07:30 PM EDT - (LOCPADMIN) Alteryx is great| | Alteryx is great| |
Solved! Go to Solution.
@lnkh Can't say this would work for all your situations, but based on your example seems to be okay. There may be a more direct route but I'm not sure what it would be. You can use the regex tool in tokenize mode in order to get the multiple comments in the same string.
Thanks Neilgallen. I tried your suggestion but it stops parsing the comments once it finds the first match. So I cannot get the output desired for the first record.
This example still taught me something new. I appreciate your help!
HI EW,
Your solution works!!! But when I concatenate the results, they are concatenated with a ',' separating each record instead of |
When I plug my file into your workflow it works but when I try to recreate from scratch I get commas.
What am I missing? Which part of the workflow configures this?
Thank you so much!
You can set the separator at the bottom of the configuration window for the summary tool.
My mistake Neilgallen. YOur solution works too.
Im still trying to figure out that regular expression though =) . thanks so much!
O thanks!!
This is the best forum I've every seen. thank you everyone for your help.