Have you tried making the structure into a query and doing a QoQ in your
sorted order?

chris 

-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 08, 2006 2:06 PM
To: CF-Talk
Subject: Re: sort getMetaData

You'll have to do the sort manually.  Easiest bet would be to use a
secondary structure to sort them, and then create a new array in
sorted order.  Here's psuedocode:

unsortedArray = ...
sorter = structNew();
for (i = 1; i <= unsortedArray.length; i++) {
  sorter[unsortedArray[i].name] = unsortedArrray[i];
}
sortedArray = arrayNew(1);
for (i in listSort(structKeyList(sorter), "textnocase")) { // list loop
  arrayAppend(sortedArray, sorter[i]);
}

cheers,
barneyb

On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I do a getMetaData on a return from a query.  It gives me an array
with a struct
> (IsCaseSensitive,Name,typeName) in each space.  I want to sort that
array by the
> struct attribute "Name".  In other words, I want these structs
alphabetically
> sorted by name within the array.  I've not figured out how to do that
yet.  I
> couldn't get StructSort to work that way, but I've never used it
before.
>
> I really need assistance on this one.
>
> thank you.
>
>
>      daniel
> - webguy -
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263324
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to