Compare IEnumerable variables

contactLink is my IEnumberable variable; it may contains 1 to 10 objects.

Question 1: how to eliminate duplicates (when it contains at least 2 objects) before writing results in another variable called contactResult ?

I was trying using IF activity but failed.

@IPIX

Check below for your reference

Hope this will help you

Thanks

Mine variables are: IEnumberable… tried contactLink.Distinct but it’s not working!
Thanks, but that example is for integers based variable.

@IPIX

Okay, what type of info you are storing into IEnumberable variable, is that type of String or Int ?

Thanks

Email addresses.

@IPIX

Then you can make it as String instead of object

then you can check as below

Hope this will help you

Thanks

Let me check…

I’ve successfully convert IEnumerable object in one single string
(Assign to a new variable: String.Join(",",name_old_variable).

Now I have a string with 7 emails.

How do I eliminate duplicates?
*the link provided above shows how to compare 2 lists, not usefull.

I’ve managed to eliminate duplicates from one single string
(after I’ve converted IEnumerable variable to String).

Just used Assign activity:

String.Join(", “, variablename.Replace(” “, “”).Split(”,"c).Distinct().ToArray())

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.