Hi there
I'm trying to sort data (list of local doctors) by last name (surname). The only problem is that my Node Title is the doctors name and I don't want to have to enter the data twice or re-enter all that data.
Is there some sort of argument or something I put into my view to make it work that way. Any help is appreciated.
To see the site in question, go to www.upstatehealthlink.com
Thanks
JR
Comments
Comment #1
merlinofchaos commentedSorry, Views only sorts on the data you have. Your best bet might be to use something like CCK computed field to calculate what the last name is and create a hidden field for sorting. But Views can't do this without placing the data in the database.
Comment #2
jack_ruby commentedThanks for in the advice,
What I'm wondering: is there not a way to tell views to sort the Name field (firstname lastname) so that it sorts by everything after the "space" character ?
I'll check into using CCK to do that, too.
Thanks
JR
Comment #3
merlinofchaos commentedSorry, SQL can't do that, and Views just creates SQL queries, ultimately.
Comment #4
jack_ruby commentedThanks, I found this node
http://drupal.org/node/559618
which seems helpful
JR
Comment #5
ilw commentedHello,
Could you lease share with me, Did you find a solution for that?
Comment #6
jack_ruby commentedI was able to solve the problem only by separating the "name" field into "first name" and "last name". It can be tedious, but it's the only way I can see to do it. If you have the sql skills, you can just write a query to break the field up into two new fields. then just build the view with the two new fields. Hope that helps!
JR