When a new record is added, I usually default the sort order to the number of records + 1 so it is at the end. Then in a list view of all the records there is an up and down arrow next to each entry that moves it either up or down by sort order.
Say you click the third record to move it UP to the number 2 slot, you would just move 2 to 3 and 3 to 2 and vise versa to move it the other way. I can provide code if you want an example but it's the best way I've found to do this. It sure beats giving them a field to put a number in -----Original Message----- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 1:42 PM To: CF-Talk Subject: How to re-order items? Hi, all. I'm trying to figure out the best approach to ordering the display of Real Estate agents on a website. I have it by last name currently, but my client wants to re-order by Seniority. So, I figured I'd just put a field in the database called "Display_Order" and then the person who manages the site could provide a number for each person. e.g. 1 on top, 2 next, etc. The problem would come when an agent gets added to the list who would be between 1 and 2. (I don't want to use decimals). I can instruct the manager of the site to put 10 for the top spot, then 20 for the second, etc. That leaves room for additional spots to be added between 10 and 20. However, I'm looking for a long-term solution. Would it be a good approach to have them initially number the agents starting with 10, then 20, and have them say, use 15 if someone needed to between 10 and 20, but code the site so that all number are rounded up to increments of 10 upon entry into the database? 10 stays 10, but 15 becomes 20, 20 becomes 30, etc. Is that a good solution? What other solutions have any of you used for this? Thanks for the insight. Rick (Remember. CF 4.5 here. :o) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http: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:269682 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

