Your switch expression is the text "lead_time_type_id" which does not have a case. If you mean it to be a variable of that name, you have to place pound sighs around the variable. Like so: <CFSWITCH EXPRESSION="#lead_time_type_id#">
> Hi List, > > This CFSET is returning the error: "Variable DIFFTYPE is undefined." > > -- > > <CFOUTPUT query="get_tasks"> > <CFSWITCH EXPRESSION="lead_time_type_id"> > <CFCASE VALUE="1"><CFSET difftype="""n"""></CFCASE> > <CFCASE VALUE="2"><CFSET difftype="""h"""></CFCASE> > <CFCASE VALUE="3"><CFSET difftype="""d"""></CFCASE> > <CFCASE VALUE="4"><CFSET difftype="""ww"""></CFCASE> > </CFSWITCH> > <CFSET diff = DateDiff(#difftype#, Now(), #deadline#)> > </CFOUTPUT> > > -- > > :/ Can anybody see what I'm doing wrong? > > Thanks guys, > CK. > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192584 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

