here , you can try this
<cfset list1="1,1,3,1,3,1,4,5">
<cfset list2="">
<cfloop list=#list1# index="val">
<cfif listfind(list2,val,",") eq 0>
<cfset list2=listappend(list2,val,",")>
</cfloop>
list 2 contains your non repetitive items.
you may write a custom tag for this
usage
<cf_parselist var="da_list" list="#list1#">

code for this tag (parselist.cfm)
<cfset list1=attributes.list>
<cfset list2="">
<cfloop list=#list1# index="val">
<cfif listfind(list2,val,",") eq 0>
<cfset list2=listappend(list2,val,",")>
</cfloop>
<cfset "caller.#attributes.var#" = list2>
 you may use the variable you sent to custom tag in your templates.
Regards,
Amit Talwar

-----Original Message-----
From: Bob Wilson [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 1:00 AM
To: CF-Server
Subject: How to limit multiple instances of data to only one in a list


Hey,

Thanks for all the great info in this list.

I'm trying to create a list with one entry per item from a list of multiple
entries per item.

What do I need to do to take this multiple instance list and create
a list with just one instance of each item.

All help is very appreciated.

Thanks,

Bob Wilson



----------------------------------------------------------------------------
--
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to