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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

