Tally List : mailing list management, archiving, and analysis
click for archive home
 
Archive of:
CF-Server
Cold Fusion Server Tech
 
home
24 hour view
quick stats
weekly updates
 
all tallylists
corporate solutions
archive your favorite
help / feedback


Search the Tallylist search by keyword:

About Cold Fusion :
product's home
product's list home
 
  Archived TallyList / CF-Server: 
Subject: RE: How to limit multiple instances of data to only one in a list
amittalwar@intellikaps.com (5p/+0r)     Posted: Thursday 10 May 2001
This post: 55 views, +0 rating

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:sales@usasites.com] 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 cf-server-request@houseoffusion.com 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 cf-server-request@houseoffusion.com with 'unsubscribe' in the body or visit the list page at www.houseoffusion.com


Similar Subject Line Posts (+/- two weeks of this post)
RE: How to limit multiple instances of data to only one in a list  10 May 2001 (this post)   (55 v/ +0 r)
Re: How to limit multiple instances of data to only one in a list  10 May 2001   (52 v/ +0 r)
How to limit multiple instances of data to only one in a list  10 May 2001   (38 v/ +0 r)
 

Send a reply to the CF-Server list!
click to send a reply! NOTE: Many lists will reject your post unless you have already registered with them. Also - don't forget the right account to send from (for those with multiple emails!)

Feedback: If this post was exceptionally helpful, please help by giving this post a positive review.

 

TallyList : copyright Ububik - 2000