Thanks.. I will convert it to a Struct instead. I could slap myself for not doing so in the first place.
Been a long day........ -----Original Message----- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 1:55 PM To: CF-Talk Subject: RE: ArraySort ArraySort is for 1D arrays. It looks like you are using 2d arrays where structs may be better. Consider rewriting as: <CFSET myArray = ArrayNew(1)> <CFSET myArray[1] = StructNew()> <CFSET myArray[1].FirstName="John"> <CFSET myArray[1].LastName="Doe"> etc <CFSET myArray[2].FirstName="Barry"> etc Then use StructSort to sort. ======================================================================= Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email : [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Adkins, Randy [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 30, 2001 1:45 PM > To: CF-Talk > Subject: ArraySort > > > This is something that I serious MUST be overlooking. > Eyes are bloodshot right now from coding. > > > I have a 2 dimential array such as follows: > > myArray[1][1] = 'JOHN' > myArray[1][2] = 'DOE' > myArray[1][3] = '[EMAIL PROTECTED]' <mailto:'[EMAIL PROTECTED]'> > myArray[1][4] = 'TEXAS' > myArray[1][5] = 'USA' > > myArray[2][1] = 'BARRY' > myArray[2][2] = 'JOHNSON' > myArray[2][3] = '[EMAIL PROTECTED]' > <mailto:'[EMAIL PROTECTED]'> > myArray[2][4] = 'CALIFORNIA' > myArray[2][5] = 'USA' > > I need to SORT the array before outputting the data. > Sounds simple right??? > > It should come out: > BARRY JOHNSON > JOHN DOE > > When using the command: > <cfset sortit = ArraySort(myarray,"textnocase")> > > Question #1: > When using the ArraySort, it should evaluate all the > dimensions with in > the array for sorting, correct? > OR does it only sort on ONE dimension? > > Question #2: > When using the command above, why do I get the following error: > > Error Occurred While Processing Request > > > > > > Error Diagnostic Information > > > > An error occurred while evaluating the expression: > > > > sortit = ArraySort(myarray,"textnocase") > > Error near line 245, column 8. > > The expression has requested a variable or an intermediate > expression result > as a simple value, however, the result cannot be converted to a simple > value. Simple values are strings, numbers, boolean values, > and date/time > values. Queries, arrays, and COM objects are examples of > complex values. > > The most likely cause of the error is that you are trying to > use a complex > value as a simple one. For example, you may be trying to use a query > variable in a <CFIF> tag. This was possible under Cold Fusion > 2.0 but is an > error under later versions. > > > > Randy Adkins > Tech Lead - Novient > SRA International > [EMAIL PROTECTED] > (703) 803-1677 > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

