Thanks for all the help I know I would have gotten, but I figured it out. Human error of course :-) In my columnlist, I am doing a comma delimited list but to make it more readable, I have a space in front of the values. In my default, I didn't include the space. It only affected this page because the other pages have the first value as the default sort.
Sorry, Margaret -----Original Message----- From: Margaret Fisk [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:19 PM To: CF-Talk Subject: RE: Problem with comparenocase vs "is" in CFIF Hi everyone, I'm experiencing a strange error that I can't figure out and was hoping for some help. I've included the "problem" code below. Here is what I'm doing: I have a form that includes a report table. Each of the headers is a submit button with the name sort_order and the value of the text that displays (taken from the columnlist variable below). I also pass the previous sort_order button in a hidden field called sort_order_hidden so if the user choses the next 10 records, they will still be sorted by the selected value. I started with using "is" to compare the list value for the display names with the button value (which is the display name). However, on one of my pages, only when passing the sort order through the hidden field (the CFELSEIF), it does not find any matching value when running the statement <CFIF a[i] is Form.sort_order_hidden> (I displayed the results and the value is there, but it is not considered a match. I changed to the code to <CFIF comparenocase(sort_order_display,a[i])> and now it matches the first value (or when I remove the CFBREAK, the last value) in the loop even if for example, the list item is Company Name and the Form.sort_order_hidden is Phone. As you can tell, I'm stumped and would appreciate any advice, assistance etc. Thanks in advance, Margaret ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists