Hi @Knowledge,
We need to change the selector bits to achive, if thats not possible we need to concadinate the “C” column values if the “A & B” columns are empty.
dtResult = dtInput.Clone()
dtInput.AsEnumerable().GroupBy(Function(r) r("A").ToString()).Select(Function(g) dtResult.Rows.Add(g.Key, "", String.Join(",", g.Select(Function(r) r("C").ToString()))))
OR
dtResult = dtInput.Clone()
(From g In dtInput.AsEnumerable()
Group g By key = If(String.IsNullOrWhiteSpace(g("A").ToString()), "temp", g("A").ToString()) Into Group
Let mergedCol3 = String.Join(" ", Group.Select(Function(r) r("C").ToString()))
Select dtResult.Rows.Add(If(key = "temp", "", key), "", mergedCol3)).CopyToDataTable()
Regards,
Arivu
Hi @arivu96, thank you for helping me I’m not good at it because it began to tried it a few days ago. If is it okay can you tell me where should i put this variable?
Hi @Knowledge ,
Welcome to UiPath community Forum
Please go through this
Sequence1.xaml (8.9 KB)
Book1 (1).xlsx (9.6 KB)
Regards,
Arivu
1 Like