Create unique queue item with combined string list

Hi all,

I’m currently looking at how to create unique queue items, but where one column from my datatable is grouped into a comma separated list of strings.


As you can see from my screenshot, there are multiple columns which are unique and can be grouped together - but what I would like to do is group the ID’s in Column A / “Item ID”, to give me a datatable with unique scenarios + the Item IDs.

Desired outcome:


Would anyone be able to advise?

Thanks in advance!

Hey @sam.willson

This looks feasible, but I’m still bit confused on the grouping logic you wanna achieve (sorry) if you can explain it in detail please…


Hi @Nithinkrishna - thanks for replying so quickly!

So basically I would like my data to be grouped by the unique values in columns 2,3 and 4 (where Company ID, Comment and Notes all match - essentially like a pivot table). I’d then like the corresponding item IDs for those values to also be combined, so I’m left with a unique line for each unique variation.

I hope this makes sense, just let me know if not, having trouble trying to write it out :joy:


1 Like

Can be done in link.

Check this tutorial:
How to Concatenate multiple rows from LINQ Group By in Uipath - YouTube

This is perfect :+1:

Thanks for the explanation. Will post the query.

DT.Asenumerable.Groupby(Function(r) Tuple.Create(r(“Company ID”).To string,r(“Comment”).To string)).Select(Function(g) Clone_DT.Rows.Add({String.Join(“,”,g.Select(Function(r) r(0).To string)),g.First().Item(“Company ID”).Tostring,g.First().Item(“Comment”).Tostring,g.First().Item(“Notes”).To string}).Copytodatatable

1 Like

Hi @Gangadhar_Athili thank you for this, this has worked perfectly for me - thanks again!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.