<cfset x=5>
<cfswitch expression="#x#">
<cfcase value="1-4">
1 - 4
</cfcase>
<cfcase value="5-8">
5 - 8
</cfcase>
<cfcase value="9-12">
9 - 12
</cfcase>
<cfdefaultcase>
Not found
</cfdefaultcase>
</cfswitch>
Outputs "Not found"
> -----Original Message-----
> From: Everett, Al [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 8:36 AM
> To: CF-Talk
> Subject: RE: Need more coffee - help with CFIF logic please...
>
>
> Since when does CFCASE allow a range ("27060-28909") ?
>
> > -----Original Message-----
> > From: Mike Townend [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 07, 2002 6:15 AM
> > To: CF-Talk
> > Subject: RE: Need more coffee - help with CFIF logic please...
> >
> >
> > This *might* work... Havnt tested it and my cases are a bit rusty...
> >
> > <CFSWITCH EXPRESSION="#FORM.Zip#">
> > <CFCASE VALUE="20101-23217,23290-24658">
> > Do One (altho the above case may need to be split into 2
> > cases)
> > </CFCASE>
> > <CFCASE VALUE="27060-28909">
> > do 2
> > </CFCASE>
> > <CFCASE VALUE="23218-23298">
> > error 1
> > </CFCASE>
> > <CFDEFAULTCASE>
> > Error 2
> > </CFDEFAULTCASE>
> > </CFSWITCH>
> >
> > HTH
> >
> > Mikey
> >
> > -----Original Message-----
> > From: Les Mizzell [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 7, 2002 11:00
> > To: CF-Talk
> > Subject: Need more coffee - help with CFIF logic please...
> >
> >
> > Trying to evaluate and assign various stuff depending on a zip code
> > coming from a cfform field.
> >
> >
> > Basically:
> >
> > If the zipcode is 20101-23217 or 23290-24658 do thing ONE
> > If the zipcode is 27060-28909 do thing TWO
> > If the zipcode is 23218-23298 show error message ONE
> > All other Zip Codes, show error message TWO
> >
> >
> > Suggestions as to the best way to construct this?
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
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.