Get Unique values from a column in DataTable UiPath

This is a useful task to know and get hands-on because a lot of times with any business process we use datatable.

Let’s get into the implementation of how we differentiate different unique values from a specific column in UiPath.

Step1: Drag and drop a Build data table Activity and create a DataTable as shown below:

column in a datatable

Now, we have our DataTable created moving to next step.

Step2: Drag and drop an Assign activity and write the command there as shown below:

column in a datatable

Let’s discuss about the command that we wrote there:

  • DT- It is our datatable output for Build Data Table Activity.
  • DefaultView – This property is associated with our input datatable(DT), it can be used to sort, filter, and search a DataTable.
  • ToTable – It creates and returns a new DataTable based on rows in an existing DataView.

In this (true,”Name”) -(Boolean,Column Name)

Where Boolean value indicates we need only unique values from that column.

If you make this false then it will display all the values from the datatable column.

In Column Name, you need to enter a specific column name to look at in datatable.

Step3: Now let’s see the output of this command:

column in a datatable

This is how we can get the unique values from a column in datatable in UiPath.

Happy Learning!

Like this post then let your friends know about this-:

Leave a Reply

Your email address will not be published. Required fields are marked *