Compare 2 columns and Log message

MicrosoftTeams-image (135)
I want to compare Value and Go value and Log message as Matched/Unmatched

Hi @Bhushan_Nagaonkar ,
You can read range in Excel scope to get data
For each row use if activity compare row(Value) and row(GoValue)

Hi @Bhushan_Nagaonkar
Dt.asenumnerable.where(function(r) r(column 1 name).equals(r(column2 name))).copytodatatable

This should be in in if condition right?

Hi @Bhushan_Nagaonkar

keep it in assign and variable type is datatable

You can try with your data

Log message.xlsx (8.3 KB)
test.xaml (12.9 KB)

hi @Bhushan_Nagaonkar

please check this once

as a sample data i have tested

will we be able to fetch row name also
for eg. “Row Name” is matched\unmatched

hi @Bhushan_Nagaonkar

you can try this as per your requiremnet

Hi @Bhushan_Nagaonkar

Use read range workbook activity to read the excel and store in a datatable. Output - dt_excel.
After that use for each row in datatable activity to iterate the rows in the datatable.
Inside for each Insert the If condition and write the below condition

- Condition -> CurrentRow("Value").ToString.ToLower.Equals(CurrentRow("GoValue").ToString.ToLower)

In then block insert the log message and give the message as “Matched”
In else block insert the log message and give the message as “Unmatched”

Check the below image for better understanding.

Hope it helps!!

I will try and let you guys know. Thankyou
@Shiva_Nikhil @Nguyen_Van_Luong1 @mkankatala

I have updated the workflow image check the image in the above reply for better understanding. @Bhushan_Nagaonkar

I checked it’s working for me.

I wil try it

1 Like

Thankyou. It is working for me but I also need row name

1 Like

Can you say what is the row you want or the row index

You mean row number or row index. @Bhushan_Nagaonkar

If you mean the Input Column value which matched the values.
CurrentRow(“Input”).toString it will give the Input column value.

Hope you understand!!

Hi @Bhushan_Nagaonkar

this will gives you row index can you check the log message which i mentioned in the screenshot


@Shiva_Nikhil @mkankatala in the above excel that I have provided I also row name such as Payers Name, TaxPayer… So on .

This will give me row name value correct?

1 Like

Okay got it @Bhushan_Nagaonkar

Currentrow(“Input”).toString which gives the value of the Input Column value.
If any queried let me know

Hope you understand!!