CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Display name in search result and report as in summary
Pages: [1]

Author Topic: Display name in search result and report as in summary  (Read 858 times)

trimtri

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4.2
  • CMS version: Joomla! 1.5.23
  • PHP version: 5.2.15
Display name in search result and report as in summary
June 07, 2011, 07:04:46 am
How can I make the name displayed in search result and report as in summary ('First Name' '' 'Last Name')? Thanks.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Display name in search result and report as in summary
June 07, 2011, 09:27:53 am
For search results, no easy way to do exactly this. You can create a Profile used for "Search Results" which includes Individual - First Name, Individual - Last Name - but the search results will still always show the "sort name" (Last, First). Otherwise you'd have to dig into the query code and have it return the values in civicrm_contact.display_name (which is where that name pattern is cached), and then change Selector.tpl to use that value.

For (some / all?) reports - I think the display_name value can easily be made available by modifying the report code slightly. Note that in both cases, the default sort is by sort_name (which is what most people expect I think). So showing the display_name means the sort looks a bit confusing, e.g.:

Zachary Adams
Bill Chase
Sarah Davis
...
Protect your investment in CiviCRM by  becoming a Member!

trimtri

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4.2
  • CMS version: Joomla! 1.5.23
  • PHP version: 5.2.15
Re: Display name in search result and report as in summary
June 08, 2011, 08:12:01 pm
Thank you very much, Dave, for your help. I can update the civicrm.contact to display the name (Fist Name Last Name) as I want. But the quick search also change accordingly. How can I still keep the quick search not changing (Last Name only). Or how to make quick search can search both First Name and Last Name.

I also don't know exactly what to change in Selector.tpl. Could you show me please?

Peace and all Good.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Display name in search result and report as in summary
June 09, 2011, 10:21:19 am
You could probably save some time and frustration if you read the Extending CiviCRM section in the free online book:

http://en.flossmanuals.net/CiviCRM/

Will give you lots of info and tips on modifying templates etc.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Display name in search result and report as in summary

This forum was archived on 2017-11-26.