How can I put related data together, without repeating document names in datatable?

Hi, I need help.

I want a table with certain information to be sent in the body of my email, the table contains “Document Type”, “Employees” and “Expiration Date”.

Currently the table is sent like this (data is pulled from SQL)

But the idea is to send it in the second way, since as it is currently it is very extensive since the same document name is repeated for each of the employees

What I would need is the “treatment” to somehow build that dt in UiPath, since I already have the code to put it in the body of the email (that part is made with html).

I was trying, with build datatable and for eachs but couldn’t get it to work. If you can give me any help or any better ideas, I would appreciate it!

I don’t get it. Your columns have different layouts from example one to exemple two.
You want to merge the same document names? Or you want to remove duplicates?
Or you want to change the format from the photo 1 to photo 2?

In the first example, I have the same documents that are repeated for each employee. The idea would be to have one document of each type, and to indicate all the employees who have that document, like this one in the image below.
I pass an image, with the same information that is in the first example, so that the idea is better understood:
image

Hi @Maite_Escalada

You can use group by method in linq to group the rows based on column,

Take a look at this,

Thanks

Never use linq, I will see and adapt the solution.
Thank you so much, @prasath_S!

If it works then I’ll upload the solution :slight_smile:

1 Like

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