The code below builds a collection when a user enrolls in a particular course. The collection (colEnrollItems) is a list of records filtered by the users' email address (GvarUserEmail) and the TrainingKey (galCourseDetails.Selected.TrainingKey) which is a specific training course for which they are registered. There was a bug that introduced duplicates into my dataset and my current patch process was only updating the first record. I need to update all records that might exist in the dataset for this email and training key combo.
This code is supposed to compare the source file (Training - Master Output).ID to the "NewID" in the before mentioned collection. It will update three fields in the source file and loop through all of the records picked up in the collection.