How to get From Description column Tax in the price column- condition value in front of them. Also same for channel discount
Eg: Tax in the Price=17313.56
Channel Discount. =0.00
.
Position is not fix in the table for Tax in price and Channel discount.
Use ‘lookup data table’ activity by setting the column and value that you want to find for example ‘Net Share’ in Column ‘Description’.
As output you can get both the row number for later use, and/or the value in that row for another column, such as ‘Condition value’. You’ll get row = 5 and the value is 96,186.44
Alternative approach, if it not possible to read the screen into a datatable object:
Use anchors. Target the cell in column ‘Condition’ with an Anchor to the cell Channel Discount. Probably less effective, but might work if your table/grid is less than scrapable.
Use lookup range activity and find “Tax in the price” you will get the cell number in which it is placed.
After that remove the alphabet using by assign a variable Eg: Cell_No=System.Text.RegularExpressions.Regex.Replace(Lookup_range_var,“\D”,“”) from that lookup range output and use read cell activity read the condition value column.
Suppose Condition value is present in C column. Use read cell activity in range pass “C”+Cell_No to get Condition value of Tax in the price.
So that you will get the value in front of Tax in the price as the row will be same.
Use the Data Scraping Wizard to extract the table into a DataTable.
Then
Loop through each row of the DataTable using a For Each Row activity.
Check if the Description column contains the keywords (“Tax in the Price” or “Channel Discount”):
vb
Copy code
If row("Description").ToString.Contains("Tax in the Price") Then
taxValue = row("Price").ToString
ElseIf row("Description").ToString.Contains("Channel Discount") Then
channelDiscountValue = row("Price").ToString
End If
Hie @satish.rathi59 you can do this using UiPath activity
first read the data and save the data in the datatable format use for each row activity and inside this use if condition where you can check if des column is = tax value if this is true in the then branch use assing activty and in the value field pass currentrow(columnname) where the value column is present so it will store the price .
Considering you have your data table as dt_dataTable and required rows will always be present, use assign activity as below.
If Tax in the Price, Channel Discount are not present below code will throw error so check null before getting value.
Tax in the Price = dt_dataTable.DT.AsEnumerable().Where(Function(row) row(“Description”).ToString() = “Tax in the Price”).CopyToDataTable(). Rows(0).Item(“Condition value”).ToString();