> Hello, > Can someone please explain to me why cfcase can not use a > variable as it's > value, I would expect this to be a simple and useful > feature. And does > anyone know a way around this?
> Thanks, > - Charles The subject has been beaten to death in previous threads on this list... it's always been this way -- afaik there aren't any _plans_ to change it... you might try this: <cfswitch expression="#exp#"> <cfcase value="staticcase">...</cfcase> <cfdefaultcase> <cfif expression is othervariable> ... <cfelse> ... </cfif> </cfdefaultcase> </cfswitch> Also note the delimiters attribute in the cf-case tag allows you to specify multiple values for a single case statement -- which may or may not help, dependent upon your purpose. Also the cfscript implementation of switch-case follows the ecmascript rules (which are also the same as switch-case constructs in C/C++, Java, etc.) switch (expression) { case "val1": { ; } // this line will make val1 have the same result as val1 case "val2": { ... break; } default: { ... } } hth s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198855 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