consider the following scenario:
We have to systems with user information (e.g. Active Directory LDAP and Human Resource Tool in a SQL DB).
Both holds information for users and of course some of the fields exists in both systems, for this example let's assume those fields are Employee ID and Lastname of employee.
Let’s additional assume that my HR Tool is my primary system and my LDAP is my secondary system.
What I want to achieve is a comparison of the data sets to either confirm the information are synchronous or my data needs to be updated in the secondary system.
This is my idea of an approach by now:
Query HR Tool for Employee ID and Lastname, which gives me two collections of the same size (with execute SQL action)
Query LDAP for Employee ID and Lastname, which gives me two collections of the same size (with query LDAP action)
Both systems will give me like 3000 rows, unsorted.
My Employee ID is my Identifier.
Now I start with a for each operation on my HR Employee ID Collection, and with the index and a collection operation I can get the related Lastname.
Finally here comes my question:
What is the best way to find the related data in my LDAP Employee ID Collection?
I could go through the whole collection and compare my current value with each value in the secondary collection, but this sounds like heavy load for a lot of entries. Worst case I have to do 3000 comparisons before finding what I’m looking for.
What I was looking for, but was not able to find it, is “Find Element in collection by value and return index”
Afterwards I want to compare both Lastnames and do something, whether they match or not.
BTW I guess it is the better idea to first load all data from both systems to my workflow instead of making like 3000 single calls receiving and computing data one by one.
So do I miss any Workflow action, that could be helpful for my scenario?
Thanks in advance