Check value 2 file

Hello,

I want to check data in file input column Owner , SR Category , SR Sub Cat,SR Issue with file master column Product Line, Category, Sub-Category,Issue
If match stamp Y in column Check in file input else not match stamp N

Please guide me for solve it.

Thank you.

input.xlsx (11.3 KB)
master.xlsx (12.9 KB)

1 Like

@fairymemay
Suggest below solution for your consideration.

  1. Read master.xlsx as dt_Master
  2. Loop all rows in dt_Master: concatenate each value of those 4 columns in a string, then append it into a list (list_Master)
  3. Read input.xlsx as dt_Input
  4. Loop all rows in dt_Input: concatenate each value of those 4 columns in a string, then check it’s in list_Master or not (list_Master.Contains(<string_variable>))

@healsko_ho I confuse about step2,4 please guide me for this step.
what activity append it into a list (list_Master)?

Step 2 is to generate a list of string for further validation. From the sample master, the list has 4 values:
ERComplaintServiceIR (Inter)
ERComplaintServiceData
ERComplaintServiceIDD (IDD)
ERComplaintServiceSMS

In step 4, in each row, concate the value to be validated, take 1st row as example, ITComplaintServiceSOS. Check ‘ITComplaintServiceSOS’ in above list or not.

To append something into a list, use activity ‘Add To Collection’.

@healsko_ho I don’t know how to compare list.

Now flow as attached.

test.xaml (14.2 KB)

Please guide me for solve it.

Thank you

@fairymemay
You’re almost there~
In your second for each row:

  1. The assign value: the first concat value should be ‘CurrentRow(“Owner”).ToString’ instead of ‘CurrentRow(“SR Product Line”).ToString’?
  2. Remove ‘Append Item to list’ since it’s not necessary.
  3. In the if condition: list_Master.Contains(str_concatInput)

@healsko_ho In my version not have activity Add To Collection.
How to add list?

1 Like

Hi,

Output:-

Xaml File:-
compare 2 files forum.zip (22.6 KB)

If this works for you, please mark it as a solutions, so others can refer the same. :slight_smile:
Thanks

I use linq query to compare, Do check. My solution wont require Add to collection.

Thanks

1 Like

@fairymemay
You already use ‘Append Item to List’ correctly. They’re similar.
Ofc linq or some other methods could archive your goal as well but I believe for each row is much more easier to understand.

1 Like

Thank you for your support.

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