Replace all spaces on the list first.

-----Original Message-----
From: Smith, Daron [PA] [mailto:[EMAIL PROTECTED] 
Sent: 19 September 2003 17:06
To: CF-Talk
Subject: FW: ListFind not working properly

I'm not sure what I'm doing wrong with this list function.  I have a
variable with a list in it, I want to take an action when the variable
is equal to the query row variable.  I can get it to work with
listcontains but that will return more values than I want.  I can also
get it to recognize the first value in the list  when I hardcode the
list rather than use a value.  It's almost like it doesn't evaluate the
variable and treat it as a list.

Here's the code,
<cfset variables.accesslist = "1, 82, 104">
<!--- Cat_ID equals 1 --->

<cfif  listfind(#variables.accesslist#, #cat_ID#) GT 0 >
Blah, Blah, Blah

<cfelse>
......

</cfif>

The cfelse condition is always returned.  I've tried every combination
of quotes and pound signs also, to no avail.

Any help would be appreciated.

Daron Smith


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137700
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to