1.Delete the rows where value in “Bill Held” = “Hold”
Filter out only “hul” from Brand Name column.
Remove “S-“ from Bill No.
Create a new column “Returned with Dues”. Add the value present in “Returned” column and “Dues” column and populate that in the newly created “Returned with Dues” field.
Below are the steps to achieve each of the requested actions in UiPath using a datatable:
Delete Rows Where “Bill Held” = “Hold”:
You can use the Filter Data Table activity to create a new datatable that excludes rows where the value in the “Bill Held” column is “Hold”. Then, assign the filtered datatable back to your original datatable.
Filter Out Only “hul” from Brand Name Column:
Similar to the previous step, use the Filter Data Table activity to create a new datatable containing only rows where the “Brand Name” column equals “hul”.
Remove “S-” from Bill No:
You can use a For Each Row loop to iterate through each row in the datatable. Inside the loop, use an Assign activity to modify the “Bill No” column value by removing the prefix “S-”.
Create a New Column “Returned with Dues”:
Add a new column named “Returned with Dues” to your datatable using the Add Data Column activity. Then, use a For Each Row loop to calculate the sum of values from the “Returned” and “Dues” columns and populate the new column.
Remember to adjust the column names and datatable variable names according to your specific use case. These steps should help you achieve the desired actions in UiPath!
Delete rows where value in “Bill Held” = “Hold”:
YourDataTable = YourDataTable.AsEnumerable().Where(Function(row) row.Field(Of String)(“Bill Held”) <> “Hold”).CopyToDataTable()
Filter out only “hul” from Brand Name column:
YourDataTable = YourDataTable.AsEnumerable().Where(Function(row) row.Field(Of String)(“Brand Name”).ToLower() = “hul”).CopyToDataTable()