2

Which method really works if search results listing (doesn't matter, simple search or advanced one, both are the same) should be sorted by Last name, not by Contact ID? Things we've tried so far (none works):

  1. "Include Order By Clause" radio button at Administer -> Customize Data and Screens -> Search Preferences (per this suggection)
  2. Individual Sort Name Format at yoursite/civicrm/admin/setting/preferences/display?reset=1 per this suggestion
  3. Sort name checked in the DB, no influence on search results display.

Guess there should be some kind of "easy fix" like adding "ORDER BY LAST_NAME DESC" somewhere among templates. Or we need to go deeper into hooks/custom extension system?

  • Have you tried the settings in civicrm/admin/setting/search?reset=1 you should be able to have an alpha pager and set the sort results? – Parvez Saleh Nov 17 '15 at 17:32
  • Also by default CiviCRM is set to sort by last name, check the sort name setting in this page civicrm/admin/setting/preferences/display?reset=1 – Parvez Saleh Nov 17 '15 at 17:38
  • @Parvez Saleh Thank you for notes; yes, I've tried both and even mentioned this in an initial question, in order to highlight, that standard ways doesn't work.. – yurg Nov 17 '15 at 17:53
  • If you have access to the Database you can check what values are stored in the sort_name field for the contacts, if this is wrong/incorrect then that might be the issue and they'll need to be re-evaluated, which can be done using CiviCRM functions. – Parvez Saleh Nov 18 '15 at 9:51
  • @Parvez Saleh Thank you for note; that is what we've done before, as it stated in #3 of the initial question.. – yurg Nov 19 '15 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.