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) »
  • Include middle name in sort name
Pages: [1]

Author Topic: Include middle name in sort name  (Read 2013 times)

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Include middle name in sort name
January 24, 2010, 02:31:26 am
Civi offers 3 core fields to store contact names: First name, Middle name , LastName.
In the Dutch translation these fields are used as follows:
Initials (Titelatuur en voorletters), Middle name (tussenvoegsel- means: insertion), Lastname.

Vincent Willem van Gogh would be entered as follows:

firstname: V. W.
Middle name: van
Lastname: Gogh

Civi will show the sort name: Gogh, V.W.
It should be however: Gogh van, V.W.

In Dutch "Vincent Willem" are the first name(s) and "Van" is a middle name. The full last name is composed by adding Middle name and Lastname.
I don't know if this unique to the Dutch language but, because of this construction, ideally the Class for sort_name should be adapted to include the middle name: [last_name][middle_name][,][first_name]

A work around would be to enter "van Gogh" into the last_name field, but then "van Gogh" would be sorted by "v" while it should be by "G".

If the ideal sorting should include the middle name I will file a feature request.
Thanx

I also saw this post. It might be related: http://forum.civicrm.org/index.php?topic=8202.0

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Include middle name in sort name
January 24, 2010, 09:34:16 am

a couple of options for this:

1. we should make sort_name / display_name hookable functions, so folks can change the way they are built (i.e. the dutch can add the middle name etc)

2. in the short term, you can add a trigger to the database to fix both the sort and display name when a contact record is inserted/updated. I think this is a good quick fix :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Include middle name in sort name

This forum was archived on 2017-11-26.