Comparing two datatables and updating the joined datatable with Yes or No?

Hello Team,

The comparing of the two datatables and finding the matches works but the issue is with the updating the column “Match Found” it inputs wrong values as you can see below

Main.xaml (13.8 KB)
B13 USSD.xlsx (11.7 KB)
IPO-PERFORMANCE.xlsx (13.4 KB)
Matching-Data.xlsx (8.6 KB)

Kindly advise

is it a same excel as per the screenshot?

If same excel and you are using excel application scope, you can simply write a IF formula for that column element and that eill be populated.

If you need to do it at data table level, once you get the join datatable, you can use for each datarow and compare those two values and accordingly put the value in the last column

please check the if condition i think it is SCD Number row.Item(“SCD Number”).Tostring
query

I think am doing that already but it is still not working as expected

I will try with that also but the SCD Number and the CLIENT BPID are the same so am thinking any of the two can work

Dear,

The problem in your code is that you are using two loops which is not required.
If you want to compare the first column with SCN then find the below xaml
Have updated your xaml and attached for your reference
Main.xaml (12.8 KB)

Thanks ,
Geetishree Rao

But why still I need some clarity @Geetishree Rao why I was looping two datatables because I wanted to compare the column in the dt_B13 datables with my newly created joined datatable.

That’s why
I used that approach.

Kindly advise.

Dear Kakooza,

If you are joining the tables and getting the data into one table then you need not add two loops to compare the data, as the joined table has all records from both the tables(as you are comparing columns from the joined table)
You loop through all rows of the joined table and update the Match column as I have shared in the xaml.

Could you elaborate your requirement to check that we are on the same line:
-Join Condition (column name and excel name)
-Match condition

Thanks,
Geetishree Rao

Hii

i have did some corrections in your code now its working perfectly please check itMain (6).xaml (13.7 KB)

This what I exactly needed.
So what was the issue with my work flow.

Your just comparing the same colum in the datatable so it will always return YES which isn’t right

sorry my bad i didn’t check that thing…

hey you just delete the assign activity in else condition and try it as shown below its working with your codesolution

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.