its all about the parentId, as long as you know that, and your main heading, non-indents have a parent of 0, then order them by recordId or some other ordering schema, it works.
you cfquery for parents, then under those parents, you cfquery for children that match the parentID make sense? tony weeg uncertified advanced cold fusion developer tony at navtrak dot net www.navtrak.net office 410.548.2337 fax 410.860.2337 -----Original Message----- From: John Sprenkle [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 9:19 AM To: CF-Talk Subject: Creating a list with infinite groupings and indents Say I have a table with the following records: rec id description parent id 1 Test Record 1 0 2 Test Record 2 1 3 Test Record 3 1 4 Test Record 4 3 5 Test Record 5 3 6 Test Record 6 4 7 Test Record 7 4 8 Test Record 8 3 The parent id field relates a record to its parent. I want to display the records in a list so that children records are listed indented under their parent. There can be an infinite number of nested parents and children, so there could be many indents in the list. The output in this example should look like this: Test Record 1 Test Record 2 Test Record 3 Test Record 4 Test Record 6 Test Record 7 Test Record 5 Test Record 8 Could somebody give me direction on how to program this? Sample code? Thank you. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

