On Fri, 21 May 2004 09:54:37 -0400, Philip Arnold wrote:
>That's because you're checking on the Seq number, not the Folio
>
>> <cfif not listFindNoCase(noDupList, sValNoComma)>
>> <cfset noDupList = listAppend(noDupList,sValNoComma)>
>
>Should be
>
>> <cfif not listFindNoCase(noDupList, sDisp)>
>> <cfset noDupList = listAppend(noDupList,sDisp)>
>
>
>> -----Original Message-----
>> From: Nathan R. Jessop [mailto:[EMAIL PROTECTED]
>> Sent: 21 May 2004 09:32
>> To: CF-Talk
>> Subject: Re: Ignoring duplicates in <select>
>>
>>
>> It's now displaying my list but its still duplicating. I
>> think it has something to do with the extra lines of code
>> that I stripped out before I posted this.
>>
>> Something is conflicting. I'm reading in an external file
>> that looks like this:
>>
>> 001>folio: 2201 . . . 274.00 points free
>> 002>folio: 2251 . . . 021.00 points free
>> 003>folio: 2252 . . . 001.00 points free
>> 004>folio: 2253 . . . 011.00 points free
>> 005>folio: 2254 . . . 001.00 points free
>> 006>folio: 2201 . . . 006.50 points free
>> 007>folio: 2251 . . . 230.50 points free
>> 008>folio: 2252 . . . 000.00 points free
>> 009>folio: 2253 . . . 001.00 points free
>> 010>folio: 2254 . . . 202.50 points free
>>
>> Here is ALL the code in the <CFLOOP>
>>
>> <cfset noDupList = "">
>> <cfloop INDEX="i" FROM="1" TO="#ArrayLen(arPages)#">
>> <cfset sValNoComma = arPages[i]>
>> <cfset sVal = Trim(ListFirst(arPages[i], ">"))>
>> <cfset sDisp = Trim(ListLast(arPages[i], ">"))>
>> <cfset sValNoComma = NumberFormat(sVal, "9999999999")>
>> <cfset sVal = NumberFormat(sVal)>
>> <cfif not listFindNoCase(noDupList, sValNoComma)>
>> <cfset noDupList = listAppend(noDupList,sValNoComma)>
>> <option value="#sValNoComma#">Seq:
>> #sValNoComma# Folio: #sDisp##spacer1#</option>
>> </cfif>
>> </cfloop>
>>
>> This is the output I'm getting now:
>>
>> Seq: 1 Folio: 2201
>> Seq: 2 Folio: 2251
>> Seq: 3 Folio: 2252
>> Seq: 4 Folio: 2253
>> Seq: 5 Folio: 2254
>> Seq: 6 Folio: 2201
>> Seq: 7 Folio: 2251
>> Seq: 8 Folio: 2252
>> Seq: 9 Folio: 2253
>> Seq: 10 Folio: 2254
>>
>>
>> I want it to about like this. Ignoring the duplicates:
>>
>> Seq: 1 Folio: 2201
>> Seq: 2 Folio: 2251
>> Seq: 3 Folio: 2252
>> Seq: 4 Folio: 2253
>> Seq: 5 Folio: 2254
>>
>> On Fri, 21 May 2004 14:26:19 +0100, [EMAIL PROTECTED] wrote:
>>
>> >Oops as Philip said it would need to be
>> >
>> ><cfset noDupList = "">
>> ><CFLOOP from="1" to="#ArrayLen(arPages)#" index="i">
>> > <cfset sValNoComma = arPages[i]>
>> > <cfif not listFindNoCase(noDupList, sValNoComma)>
>> > <cfset noDupList = listAppend(noDupList,sValNoComma)>
>> > <option value="#sValNoComma#">Seq:
>> >#sValNoComma# Folio: #sDisp##spacer1#</option>
>> > </cfif>
>> ></CFLOOP>
>> >
>> >was more concerned with what was going on in the loop rats :-)
>> >
>> >--
>> >dc
>> >
>> >
>> >
>> >
>>
>>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

