Hi Team,
I am trying to remove the duplicates from the row and want to get that entire column deleted.
eg:
Here I want to delete the Duplicate names and with the entire column.
Waiting for your valuable suggestion
Hi Team,
I am trying to remove the duplicates from the row and want to get that entire column deleted.
eg:
Here I want to delete the Duplicate names and with the entire column.
Waiting for your valuable suggestion
You want to delete entire Row or Column ?
And also on which column base you want to delete duplicate records.
@lakshman from Column “Name” which are the duplicate values I am trying to delete that.
Highlighte one I need to delete as it has duplicate names
I’m assuming you want to delete rows and not columns since that wouldn’t make much sense.
Mydatatable.DefaultView.ToTable(true, “Name”) by using de parameter true you will only get unique values from a column. The second parameter is the column you want to filter. This will give you unique values from column name
Try below expression.
newDT = inputDT.Asenumerable().Gropyby(Function(a) a.Field(of string)(“Name”)).Select(Function(b) b.First()).CopyToDatatable()
Can you please give an example like how to proceed or it will be really helpful if you have a example XAML file
@lakshman Do you have any XAML file as example, as I am trying to understand the process from starting
Hi @Rahulsinha ,
It is from Datatable or Excel ?
If it is excel,you use the the below activity.
Remove Duplicates
Properties like this.
Regards
Balamurugan.S
I don’t have any.
First use Read Range activity to read the data from Excel file and will give you output as DataTable and say ‘inputDT’.
And then use above expression to get unique records from input data based on Name Column.
Finally use Write Range activity and pass that newDT to write into new excel file.
Are you saved your input data into inputDT variable or not. I.e. Read Range activity output
This is what I have done in Read range under Excel application scope
But in the above screenshot it is showing inputDT is not declared. Once go to variables panel and change scope of the variable and then try once.
Are you writing above mentioned expression inside Excel application scope Activity or not ?
If not then change scope from do to entire workflow. If you click on that do scope field then drop down will come select last one in it.
First do a read range within an excel application scope to get your datatable.
then:
you have to use an assign like this
dtUniqueColumnNamesValues = Mydatatable.DefaultView.ToTable(true, “Name”)
where dtUniqueColumnNamesValues is a new datatable with only unique values names. The name my “Mydatatable” is the name of your table. Then it depends on what you need to do with the unique names. you can use a for each in your table to read the columns and decide what you want to do.
You have to create one more DataTable and named it as newDT and it should be on left hand side in Assign activity and Right hand site you have to write inputDT…
But you wrote Mydatatable…