Thanks Steve, works well.

Brian

-----Original Message-----
From: Steve Onnis [mailto:[EMAIL PROTECTED]
Sent: Friday, 20 June 2003 4:18 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Unique values


Otherwise

I knocked this up not long agpo for something i was doing

<cfscript>
        function removeDuplicates(list)
                {
                thisList = list;
                newList = "";
                for (i=1; i LTE ListLen(thisList); i=i+1)
                        {if (NOT listFind(newList,ListGetAt(thisList,i)))
                                {newList =
ListAppend(newList,ListGetAt(thisList,i));}}
                return newList;
                }

</cfscript>

Steve

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Phil Evans
Sent: Friday, June 20, 2003 4:08 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Unique values


Only put unique value in the list in the first place.
Always best to fix the problem at it's source if you can.

Phil.

----- Original Message -----
From: "Knott, Brian" <[EMAIL PROTECTED]>
To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 4:01 PM
Subject: [cfaussie] Unique values


> If I have a list or array, what's the best way to get the unique values
out
> of it.  ie is a list contain 1,2,1,3 I just want the unique values 1,2,3
>
>
>
> Brian Knott
> QANTM Studio
> Senior Database Developer
> Ph (07) 30174331
> Mob 0407572127
>
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
[EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
>


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to