This topic is locked

Sorting

3/9/2009 6:02:41 AM
PHPRunner General questions
W
webdino author

Hello,
I have some tables which contain ID´s and the user select from a dropdown (lookup) the name to this ID. That´s correct

But which must I do to sort the entrys in List Page alphabetical whith their names to and not ASC to their ID´s
Thanks for help

A
alang 3/9/2009

You probably need to join the tables in your SQL, include the name field and sort on that even if you don't display it in the list view.

M
MaxxaM 6/18/2009

I'm going to add to this because I don't believe this solution fits all models. I agree that you need to join your tables, but if you're doing an inline add or edit, you need your fields to be based on the ID with a lookup table.
Basically...if you have ID fields in your list view because you need them there for inline edits...the sorting from the labels in the list view will not work properly, as stated by the inital post...it sorts on the ID. It sorts on the ID even if you've told the lookup table to sort on the non-ID field...
Can anyone tell me how to make this work? or is this an oversight in PHPRunner....

J
Jane 6/19/2009

Hi,
I see what you're saying.

Unfortunately there is no easy way to sort records based on the Display field in the current PHPRunner version. We're working on it now.