there may be a better appraoch to this. would you please explain what you really want in more detail. like why are there 3 items in list 2, and you only talked about dealing with the first 2 items???
>From: "Double Down" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: Help With List Problem >Date: Fri, 7 Dec 2001 12:10:49 -0800 > >I have two lists that I need to compare. List one is a comma delimited >list pulled from a record in the database (1,2,3) List two is comma >delimited but has two values separated by a semi-colon that is an >application variable (1;yes,2;no,3;maybe). The problem I am having is >that I want to compare list1 with the first value in list2, if list1 >matches list2 I would like to display the second value of list2. > >This is the code that I have written: > ><cfloop list="#list1#" index="i"> ><cfif listfind(list2,i,";")> ><cfset theposition=listfind(list2,i,";")> ><cfset element=listgetat(list2,theposition,",")> ><cfset description= listgetat(element, "2" , ";")> ><cfset description1= listlast(description, ",")> ></cfif> ></cfloop> > >This code finds the first element in list1 and list2 and displays the >second value in list2 properly and that is all. It is not displaying any >of the other values because it cannot find them, even though they are >in list1 and the first value in list2. > >If anyone can help me out with this I would really appreciate it. > >Thanks > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

