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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • A script to rebuild sort name and display name for contacts?
Pages: [1]

Author Topic: A script to rebuild sort name and display name for contacts?  (Read 1530 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
A script to rebuild sort name and display name for contacts?
January 25, 2012, 08:49:53 am
We've change the format for sort name and display name.

Editing and saving each contact will rebuild sort name and display name into the new format.

Is there a script to rebuild all contacts at once?
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: A script to rebuild sort name and display name for contacts?
January 25, 2012, 09:26:42 am

dont think so, but has come up in the past. should be a good project and help clean up the sort / display name code a bit more (i.e. isolate it so it can be called from cli etc)

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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: A script to rebuild sort name and display name for contacts?
January 25, 2012, 11:29:25 am
FYI I did a workaround:

1. Export file with first name, last name and internal ID
2. Import this file back into CiviCRM, matching on internal ID

the sort name and display name will be rebuilt automatically for every contact even though it is not possible to import display name and sort name specifically.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: A script to rebuild sort name and display name for contacts?
January 25, 2012, 03:13:03 pm

dude, your creativity and ability to imagine solutions to current problems is quite amazing :)

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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • A script to rebuild sort name and display name for contacts?

This forum was archived on 2017-11-26.