How to Get Distinct Records/Remove the duplicate data from a datatable using LINQ in UiPath

Problem statement : We have a datatable that has got some duplicates values and We need to extract the distinct values and remove the duplicate ones and saves it to a new datatable

Here is the datatable
Datatable

Drag the assign activity to the workflow area and write the following query

Run the workflow and see the action

Youtube Link : Remove duplicates from Datatable in UiPath - YouTube

Medium : How to Get Distinct Records or Remove the duplicate data from a datatable using LINQ in UiPath - Manoj Batra - Medium

Github: UiPathSamples/05 - GetDistinctandRemoveDuplicateFromDatatable at main · manojbatra071/UiPathSamples · GitHub

Happy Automation

1 Like