I know this is not a direct answer to your question, but in your scenario you should not be using cfcase. You should be using cfif/cfelse since there are only two possible conditions. Also remember that the Compare function is case-sensitive.
-Mike Chabot On Tue, Jan 11, 2011 at 2:08 PM, Orlini, Robert <rorl...@hwwilson.com>wrote: > > Hi, > > I have to compare 2 values. I'm suing the cfacase and compare functions. I > have them comapring well if they either less than in one comparision or > equal to in another. > > How would I combine the cfcase to test whether the values are equal or less > than? I tried <cfcase value = "-1" or cfcase value = "0">. but I figured > that would not work. > > See below. > > Thanks. > RO > HWW > > > <cfset comparison = Compare(FORM.string1, FORM.string2)> > <!--- Switch on the variable to give various responses. ---> > <cfswitch expression = #comparison#> > <cfcase value = "-1"> > <h3>String 1 is less than String 2</h3> > <I>The strings are not equal</I> > </cfcase> > <cfcase value = "0"> > <h3>String 1 is equal to String 2</h3> > <I>The strings are equal!</I> > </cfcase> > </cfswitch> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340641 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm