I have spent all afternoon trying to get this to work and it just isn't coming. I've search the forum here and can't find the answer.....so I apologize if this is something simple - I just can't figure it out. :-(
This is for a conference booking application where admins are booking multiple bookings at the same time. So I start with one list that is all the dates they want to book and a second list that is all the dates that conflict with existing bookings.
I can't seem to manage to loop through the first (all dates) list with the second (existing bookings) list to create a new list of good dates that can be booked and put into the database.
This is my code, but it produces the whole list (all dates),
<cfloop index="AllDates" list="#NewAllDates#">
<cfloop index="badDate" list="#ErrorDates#">
<cfif AllDates is Not badDate>
<cfset NewAllDates2 = ListAppend(NewAllDates2, #AllDates#)>
<cfbreak>
</cfif>
</cfloop>
</cfloop>
yet if I reverse the logic to:
<cfloop index="AllDates" list="#NewAllDates#">
<cfloop index="badDate" list="#ErrorDates#">
<cfif AllDates is badDate>
<cfset NewAllDates2 = ListAppend(NewAllDates2, #AllDates#)>
<cfbreak>
</cfif>
</cfloop>
</cfloop>
I get just the errordate list???!
any guidance would be appreciated.....because I'm not just spinning in circles.
Stephanie
This is for a conference booking application where admins are booking multiple bookings at the same time. So I start with one list that is all the dates they want to book and a second list that is all the dates that conflict with existing bookings.
I can't seem to manage to loop through the first (all dates) list with the second (existing bookings) list to create a new list of good dates that can be booked and put into the database.
This is my code, but it produces the whole list (all dates),
<cfloop index="AllDates" list="#NewAllDates#">
<cfloop index="badDate" list="#ErrorDates#">
<cfif AllDates is Not badDate>
<cfset NewAllDates2 = ListAppend(NewAllDates2, #AllDates#)>
<cfbreak>
</cfif>
</cfloop>
</cfloop>
yet if I reverse the logic to:
<cfloop index="AllDates" list="#NewAllDates#">
<cfloop index="badDate" list="#ErrorDates#">
<cfif AllDates is badDate>
<cfset NewAllDates2 = ListAppend(NewAllDates2, #AllDates#)>
<cfbreak>
</cfif>
</cfloop>
</cfloop>
I get just the errordate list???!
any guidance would be appreciated.....because I'm not just spinning in circles.
Stephanie