You could use "listfind()" instead in your cfif query - this then won't find the incorrect matches that you're getting at the moment.
Alex > -----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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

