Assuming customers1 is required, the following result was found.
the list of unique ones from the "all" list to be left with just the duplicates. The Code v_CountDiscrepancies = 0; // l_Customers1 = Customer[ID != 0].distinct(Customer_Name); l_Customers2 = Customer[ID != 0].Customer_Name.getAll(); //...