The first thing I notice is that your list has spaces after each comma.

" 82" is not the same as "82", so that might be part of the issue?

Jerry Johnson

>>> [EMAIL PROTECTED] 09/19/03 12:05PM >>>
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:137683
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

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to