Using variables in a Switch case?

2003-03-26 Thread Shawn Grover
CF 5 doesn't like this: cfset nID = 3 cfset nTest1 = 2 cfset nTest2 = 3 cfswitch expression=#nID# cfcase value=#nTest1# brTwo /cfcase cfcase value=#nTest2# brthree /cfcase /cfswitch It throws an error saying the cfcase must have a

RE: Using variables in a Switch case?

2003-03-26 Thread James Ang
. --- James Ang Sr. Developer/Product Engineer MedSeek, Inc. [EMAIL PROTECTED] -Original Message- From: Shawn Grover [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 2:46 PM To: CF-Talk Subject: Using variables in a Switch case? CF 5 doesn't like this: cfset nID = 3 cfset nTest1

RE: Using variables in a Switch case?

2003-03-26 Thread Barney Boisvert
:46 PM To: CF-Talk Subject: Using variables in a Switch case? CF 5 doesn't like this: cfset nID = 3 cfset nTest1 = 2 cfset nTest2 = 3 cfswitch expression=#nID# cfcase value=#nTest1# brTwo /cfcase cfcase value=#nTest2# brthree /cfcase

RE: Using variables in a Switch case?

2003-03-26 Thread Shawn Grover
in the application.cfm, AND the page with the switch block. Thanks anyways. Shawn -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 4:07 PM To: CF-Talk Subject: RE: Using variables in a Switch case? You could do this: -- main_template.cfm -- cfset nID

RE: Using variables in a Switch case?

2003-03-26 Thread Matt Robertson
James wrote: Uhm.. If..elseif..elseif..elseif..etc..else..endif and CFMX has the same problem. And rest assured it is a problem that is not afflicted on every language. I posted a feature request for this functionality and some others to Macromedia and it didn't get anywhere. My impression

RE: Using variables in a Switch case?

2003-03-26 Thread Barney Boisvert
: Using variables in a Switch case? James wrote: Uhm.. If..elseif..elseif..elseif..etc..else..endif and CFMX has the same problem. And rest assured it is a problem that is not afflicted on every language. I posted a feature request for this functionality and some others to Macromedia

RE: Using variables in a Switch case?

2003-03-26 Thread James Ang
] Sent: Wednesday, March 26, 2003 3:26 PM To: CF-Talk Subject: RE: Using variables in a Switch case? James wrote: Uhm.. If..elseif..elseif..elseif..etc..else..endif and CFMX has the same problem. And rest assured it is a problem that is not afflicted on every language. I posted a feature request

RE: Using variables in a Switch case?

2003-03-26 Thread Matt Robertson
, Inc. [EMAIL PROTECTED] -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:26 PM To: CF-Talk Subject: RE: Using variables in a Switch case? James wrote: Uhm.. If..elseif..elseif..elseif..etc..else..endif and CFMX has the same problem

Re: Using variables in a Switch case?

2003-03-26 Thread jon hall
If you have a situation with 50 possible branchs, with 50 different pieces of logic (imagine that flowchart! lol), hard-coding the branches conditions would seem at least from my point of view, the wrong way to go about it. If you already have 50, the chances are that the conditions will change as

RE: Using variables in a Switch case?

2003-03-26 Thread Matthew Walker
/Product Engineer MedSeek, Inc. [EMAIL PROTECTED] -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:26 PM To: CF-Talk Subject: RE: Using variables in a Switch case? James wrote: Uhm.. If..elseif..elseif..elseif..etc..else..endif and CFMX has

RE: Using variables in a Switch case?

2003-03-26 Thread Matthew Walker
And of course removing the cfdump wouldn't hurt ;-) -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 March 2003 12:01 p.m. To: CF-Talk Subject: RE: Using variables in a Switch case? How about this: cfset zipcode = 99 cf_dynamicswitch

Re: Using variables in a Switch case?

2003-03-26 Thread Matt Robertson
Unfortunately the 5 territory thing was just a simplified example meant to demo the idea. The real thing is quite a bit more complex. And the 50 thing was 50 U.S. states. That one can be safely hardcoded in :D. At one point in an effort to ease maintenance concerns we tried the db route, but