Just to be anal, you don't need any #'s or the GT 0 at end as GT 0 evaluates to true.
<cfif listFind(variables.accesslist,cat_ID)> André -----Original Message----- From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 19 September 2003 17:32 To: CF-Talk Subject: Correction Don't you just love when people make suggestions on how to change code and their suggestion is hosed? Like the one I just publihsed. I dropped a pound sign: <cfif #listfind(variables.accesslist, cat_ID)# GT 0 > There, THAT'S better... >Put the pound signs outside the function: > > ><cfif #listfind(variables.accesslist, cat_ID) GT 0 > > > >>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:137699 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm