This content has been marked as final. Show 5 replies
You are going to have to write a small piece of code to do this.
A small function to loop through the original array once whilst building a "no duplicates" array to return sounds about right.
"sakura102384" <firstname.lastname@example.org> wrote in message
> Hi everyone, I'm a newbie in flex, i would like to know is there a way on
> to check for duplicate array elements?
> I will be using it to check for my forwarding module, I'm trying to filter
> duplicate email addresses in my email List. Is there any way i could check
> duplicate emails? Any feedback would be very much appreciated. Thanks in
Look at indexOf(), every(), and some().
Ok. So here is a simple example.
Two arrays; one source and second destination.
The second is generated upon the 'initialize' event of the Application tag (basically, first thing) based on a simple 'filter' function on the original array. It is always best to keep your original data in it's original form.
"g-s-b" <email@example.com> wrote in message
> Ok. So here is a simple example.
> Two arrays; one source and second destination.
> The second is generated upon the 'initialize' event of the Application tag
> (basically, first thing) based on a simple 'filter' function on the
> array. It is always best to keep your original data in it's original
I thought the goal was to identify if there was a duplicate in the list for
one that you were about to add, not removing duplicates that were already in
If you're going to use a filterFunction, it's probably best to just go with
ArrayCollection, since then you would only need the one variable.
Myself, I typically would use an XMLListCollections but the OP wanted an Array. Perhaps I did read it wrong for I was thinking "bulk mailing list"... oh well.