Sort Order With New Records

A place for users and developers of the Xataface to discuss and receive support.

Postby htrimboli » Sat Jul 29, 2006 5:13 pm

I read here in the forum that the new release will have a "default sort order" feature, which is great. I'm not sure if that will solve my problem or not.

When I add a new record, it always shows up at the end of the list, both in list view and in the "jump" box. When I go into MyPHPadmin and perform an "ALTER TABLE `table_name` ORDER BY `column_name`" command, this corrects the list in Dataface as well.

Is there a place I can put this command, maybe using an "on save" type trigger? I couldn't quite figure that out from the tutorials.
htrimboli
 
Posts: 4
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sat Jul 29, 2006 6:35 pm

Hi,

The default sort order feature of dataface pertains only to relationships - allowing you to have a default sort order for related records. http://framework.weblite.ca/documentation/how-to/how-to-assign-order-to-related-records

The solution that you suggest would work fine for setting the default order on the table itself. Just implement the afterInsert() trigger and performm your ALTER TABLE statement to adjust the order.

Best regards

Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 18 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved