Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Structure order

Status
Not open for further replies.

TechDude

Programmer
Jul 20, 2000
62
US
Hi,
I am creating a dynamic structure based on formfields,
unfortunately, it seems that when I loop through the structure, it is ordered alphabetically instead of in the order that it was created.
does anyone have any insight into the wwy in which structures are ordered?
thanks,
-Chris
Chris Sorel
chris@exnihilo.com
Remember, If you continue to do what you have always done,

you will continue to get what you have always gotten.
 
Structures are always sorted alphabetically by default.
There is a custom tag (from Spectra) called:
cfa_structsortsubcommonkeys, that will return a sorted array.

Maybe you could try:
<cfset ordererd = listsort(structkeylist(yourStruct), &quot;textNoCase&quot;)>
And looping over it.

webron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top