I want to filter the highlighted column based on unique numbers Like we can perform easily in excel, how can it be done with UiPath?
Try with
dt.DefaultView.ToTable(true, "yourColumnName")
or
dtConsulta.AsEnumerable.GroupBy(Function(x) x("yourColumnName")).Select(Function(r) r.First).CopyToDataTable()
Regards
read the data into datatable(dt) then use assign
uniquedt = dt.DefaultView.ToTable(True,“ColumnName”)
This will give all unique values in a table
cheers
I want to find out these unique values from a column. e.g. 2110 appears multiple times in a column but I want to consider the value as a single unique value in this column
give a try with the above codes, that should solve your query
regards
thanks to both of you for helping me out, the filter is working as per my requirement
can you please help me once more to store column (H to I) in a datatable and later on I want to input these values in a system by iteration.
You can use read rnage with H:J or you can read whole datatable and then use filter datatable…in configure…select column tab and give the column names you need and only those would be retained
Then you can use a for each row in datatable to loop through
Currentrow(“columnname”).ToString will give the data
Cheers
dt.DefaultView.ToTable(true, "sou", "sku_code", "qty", "plant_code")
here I can find out the whole datatable,
but can I get an individual output for each sou e.g. one set of datatable for 2110, then for 3810, etc.(to be continue)
If you need individual…use for loop on the unique and then use filterdatatble on the second table where you have 3 columns…include the invoice column as well and in the loop for each iteration you will get each filtered data separatelt
cheers
just use a loop as Anils said like that
I am trying to figure out filter only one id at a time with corresponding values, and filter data table is not helping me to get the desired solution, so how may I proceed, can you assist once more?
dt.DefaultView.ToTable(true, “sou”, “sku_code”, “qty”, “plant_code”, “id”)
You mean like that? Or what should be your expected output?
for easy understanding, I’ve created a dummy excel of input and output
here it is, also only the column C and D will do fine for me as output
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.