Filter unique email id from list

Hi, I have a scenario in which i want to filter the list which has duplicate email ids and save it to another list with unique email ids. I have one list called RequestList which has let say total 50 records. In which there are only 5 email ids used I want to filter those 5 unique email ids and store it to other list which i can use further. for that i have created temporary entity called emailunique and created a microflow. It first check the if emailuniquelist has data or not, if no then add to list and if it has data then loop through it and check for duplicate records. For 2 records it works fine but as the size of the emailuniquelist increases from third record it kept adding duplicate entries as loops through it. i am attaching image of microflow. please help
2 answers

One option is to use the ListUtils:


See its documentation:

Example 4: List clean-up, removing redundant items

You may want to clean-up a list by removing duplicate items (i.e., items with the same attribute value). This can be achieved by using the Filter function with the following filter to get the unneeded redundant items:
<xsl:for-each-group select="record" group-by="@lastname">
<xsl:if test="count(current-group()) > 1">
<xsl:for-each select="current-group()">
<xsl:if test="position() > 1">
<xsl:copy-of select="."/>


If you want to do this with your own microflow, you can keep it simpler:


You are missing a break inside the loop. See updated screenshot with my mad photoshop skillz