Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListFind not returning a value

Status
Not open for further replies.

mrsbean

Technical User
Jul 14, 2004
203
US
I'm not very good with Coldfusion yet, but it's not for lack of trying. I love coming here for wisdom though[glasses].

Code:
<cfif #moveup# EQ "moveup">
<h1>Move up</h1>
<h2><cfoutput>#custList#</cfoutput></h2>
<h2><cfoutput>#custList2#</cfoutput></h2>
<h2><cfoutput>#editList#</cfoutput></h2>

<cfset thisOne = ListFind("#custList2#", "#editList#")>
<h3>last selected: <cfoutput>#thisOne#</cfoutput></h3>
</cfif>

The values #custList#, #custList2#, #editList# are returned from a form. I put the output statements in to make sure that they values were being passed correctly by the form. Here's what I have when the form values are returned:

Move up
,1,2,3,4,5,6
, 89, 90, 91, 92, 93, 94
90
last selected: 0

Last selected should be 2 or 3 (not sure if it will count the first value (blank and comma) in the index or not. It's not finding "90" in the list and not returning an index value. What can I do to fix it?

Thank in advance,

MrsBean


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top