If the words you need to sort are not repeated in the same cell, you could use a -cell splitter- node with “create a set” as splitting option with comma as separator. This should sort the words within the cells in a set format. Then you can use a -rename column- node to convert the column set type back to string type. This should do the trick.
The challenge is solved now. I’ve applied unpivoting-sorting-pivoting sequence to get closer to expected results
with Cell Splitter output set to ‘As new columns’.
Pivoting node generates the following outcome
For the record, the route that @aworker had in mind works if you put a Column Expression in between and use the arraySort() function. That saves you quite a few nodes.
I preferred it to a solution involving “Sorter”, simply because Sorter is going to sort ALL of your rows, so you would need to take care to ensure you don’t reorder your data where you don’t want to.
I was disappointed though at not being able to find a way to improve on @ArjenEX’s Column Expressions solution and so…
… here is my trusty friend String Manipulation with a single node solution, using a java hack… but only because otherwise @gonhaddock will read this and be disappointed
It was @ArjenEX 's use of arraySort() in Column Expressions that made me think of it. Yes it’s another undocumented “java hack”, but I find it fun Sorting comma separated list.knwf (18.2 KB)
hi @Kazimierz , yes you are right that there are often many ways to achieve the result.
Glad you got what you needed. As I believe that this is the type of small task that might occasionally come up again, I decided to turn the String Manipulation into a component that allows you to specify the delimiter (both original and new), and also reverse the sort order. This time I used the String Manipulation (multi column), so that it could be applied to more than one column at once.