Comparison of tables

0
Hi, has anyone done a comparison function of two tables, outputting three different outputs for adding, deleting, and modifying on the original data? How should I write microflow?How should I write microflow?Or do you have a case study to share? Thanks!
asked
1 answers
0

Is this what you would like to achieve? Comparing the yellow & green en showing results like the pink?

this makes up for three entities: Employee_Local, Employee_Master, ComparisonResult… But if you have it all in one entity it will a little different…

 

 

Step 1 – Reconcile Employee_Local & Employee_Master

  • Typically by making two lists and sorting on an ID field (EmployeeID in the example)
  • Iterate through each of the lists and create ComparisonResult objects for each EmployeeID that is missing in one of the two

Step 2 – Compare matches

  • Iterate through one of the lists, find the corresponding Employee from the other ID
    • compare each of the attributes and create a comparisonobject for any mismatch and add some description of the mismatching attribute or even detailed “Email Adress: vijf@mycompany.com vs five@mycompany.nl” 
    • If no mismatches you can decide to create a ComparisonResult OK or just do the next…

You can do all of this using the standard Mendix microflow actions, but it will take some effort depending on the amount of attributes in your object to compare.

answered