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