How to combine values of multiple rows into one

Hello,

Does anyone know how to combine the values of multiple row into one? Here is the example below:

Input
image

output
image

Hi @ndtran85

Can you try the following?

Sequence6.xaml (12.3 KB)

Input:
image

Output:
image

Hope this helps!!

@ndtran85

finalmodifieddata.zip (8.0 KB)

It works!! thank you so much! Just one quick question. If the patient name appears on all the row, do we need to change anything in the code? Thank you so much!

image

Hi @lrtetala ,

Thanks so much for the code. It works! But I have another question. Say if the patient name appear as below, what should I change in the code?

image

@ndtran85

Try this in assign activity

dt = dt.AsEnumerable.GroupBy(function(x) x(0).ToString).Select(function(x) dt.Rows.Add({x.Key,String.Join(",",x.Select(function(y) y(1).ToString))})).CopyToDataTable

cheers

Hi @ndtran85,

Please find the attached xaml file change the path as per the requirment.
Still if you are facing any issue please visit the below mentioned link.

Link:- https://youtu.be/S_69jQoGI_c (This video will pop out by next week of wednesday 27-Dec-2023)
Channel Link:- https://www.youtube.com/channel/UCtx5wWVbY-NuCKclc6v7NOA
How to combine values of multiple rows into one Solution-No-8.xaml (14.5 KB)

Regards,
Techystack / Pavan Kumar

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