Yes I tried listcontains and it did the exact same thing as my cfif using contains did. I'll give listfind() a try.
-----Original Message----- From: Andre Mohamed [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2003 9:30 AM To: CF-Talk Subject: RE: Parse formated list You would use ListFind not ListContains because ListContains looks at elements to see if they "contain" the specified substring. -----Original Message----- From: webguy [mailto:[EMAIL PROTECTED] Sent: 03 July 2003 14:29 To: CF-Talk Subject: RE: Parse formated list This ??? ListContains(list, substring [, delimiters ]) Description Determines the index of the first list element that contains a specified substring. Return value Index of the first list element that contains substring. If not found, returns zero. Category List functions Syntax ListContains(list, substring [, delimiters ]) WG -----Original Message----- From: jeremy [mailto:[EMAIL PROTECTED] Sent: 03 July 2003 14:16 To: CF-Talk Subject: Parse formated list I have a list of days in a month being returned from a query. Example record set would be 2,19,19,21,27 Number between 1 and 31. I then loop through this query with the code below which generates a list var that looks like 19,19,21,27 when outputted. <CFLOCK Scope="Session" Type="Exclusive" Timeout="5"> <CFSET Session.Calendar.EventListingDate = ""> <CFLOOP Query="getmonth"> <CFSET Days = #DateFormat(getmonth.auctiondate, "dd")#> <CFSET Session.Calendar.EventListingDate = ListAppend( Session.Calendar.EventListingDate, Variables.Days)> </CFLOOP> </CFLOCK> That is all well. HERE IS THE PROBLEM. The problem is here with this cfif. Session.Calendar.EventListingDate contains the above list 2,19,19,21,27 And Variables.CurrentDay is a single number between 1 and 30. If CurrentDy is say 7 then this if evaluates true as 7 is in 27, but I don't want that. I want the cfif to check for JUST 7 in the comma delimited list. How would I do this. It seems like there should be a list fucntion for this but I can't find it. <cfif Session.Calendar.EventListingDate contains Variables.CurrentDay> </cfif> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4