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) »
  • Customized Greeting
Pages: [1]

Author Topic: Customized Greeting  (Read 2417 times)

UGS

  • Guest
Customized Greeting
October 29, 2007, 08:44:24 am
Is there any documentation on how to customize the greeting when you are entering a new contact?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Customized Greeting
October 29, 2007, 03:27:43 pm
The "Greeting" functionality is pretty "under-developed" so far. How are you planning on using it? What customization(s) do you need?
Protect your investment in CiviCRM by  becoming a Member!

millionleaves

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
    • Millionleaves
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Customized Greeting
August 18, 2008, 10:50:08 pm
Quote from: Dave Greenberg on October 29, 2007, 03:27:43 pm
The "Greeting" functionality is pretty "under-developed" so far. How are you planning on using it? What customization(s) do you need?

I think I may need to use a customized greeting. I can't find any other threads or documentation where this has been discussed, so I'm not even sure if I need a customized greeting or whether there is another way to attack the problem I'm facing. But it seems like the most appropriate place to post rather than starting a new thread.

Situation:
I have a spreadsheet of individual contacts from a client. The spreadsheet has fields for First Name, Last Name and Partner. In some cases, the partner has a different last name to the primary contact, and the partner last name is shoehorned into the Partner field as well. At present, the Partner field is completed with values such as "& Mary" so that a mail merge using First Name, Partner, Last Name would be addressed "Dear John & Mary Smith".

Challenge:
I need to clean this spreadsheet up for import into CiviCRM. The challenge I have is how to deal with the Partner field. The ideal solution would ensure that communications from CiviCRM are addressed in the same manner as they are now.

Proposed Solution:
My proposed solution is below.

Add custom fields for Partner First Name and Partner Last Name to the Individual contact form. Create a customized greeting that combines these with the First Name and Last Name fields to create an acceptable greeting as in the following examples:

Example 1:
First Name = Bob
Last Name = Jones
Partner First Name = Mary
Partner Last Name = Smith
Customized Greeting = Dear Bob Jones and Mary Smith

Example 2
FN = Mike
LN = Wilson
PFN = Jeane
PLN = blank
Customized Greeting = Dear Mike and Jeane Wilson

Questions:
- Does this make sense?
- Is there a better solution than this? I've explored linking individuals and partners to Households but I'm not convinced it's the way to go.
- Can I use Customized Greetings in the way I've described?
- If so, how? Is coding required?

Any thoughts, feedback or pointers would be welcomed.

Thanks

David
Millionleaves - CiviCRM and Drupal services for New Zealand and the world
http://www.millionleaves.com

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: Customized Greeting
August 19, 2008, 01:41:18 am
Quote from: dwparrott on August 18, 2008, 10:50:08 pm
- Does this make sense?

yes

Quote from: dwparrott on August 18, 2008, 10:50:08 pm
- Is there a better solution than this? I've explored linking individuals and partners to Households but I'm not convinced it's the way to go.

this seems fairly reasonable for your use case

Quote from: dwparrott on August 18, 2008, 10:50:08 pm
- Can I use Customized Greetings in the way I've described?

as mentioned previously, customized greetings is under-developed/not-developed. So to some extent you can use it any way you want, BUT you'll also need to add code to support your use case

Quote from: dwparrott on August 18, 2008, 10:50:08 pm
- If so, how? Is coding required?

yes, you'll need to write custom code. do you need this for mailing labels only?

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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Customized Greeting
August 19, 2008, 11:15:54 am
There is some functionality in Mailing Labels configuration that can get your "part way there". You can reference custom fields within the "Individual Name Format" under Global Settings >> Address Settings.

I did an experiment to cover your 2nd example. Added a custom field for Partner First Name (custom field id = 4) and then modified the Individual Name Format to be:

Code: [Select]
{contact.individual_prefix}{ } {contact.first_name}{ and }{contact.custom_4}{ }{contact.last_name}{ }{contact.individual_suffix}

This works great as long as all the contact you're doing the Label run for have the same setup (partner first only). You could cover your 1st example by adding partner first and last in that format - but having to change the setting for each run isn't really practical. Bottom line is this may be more of a thought starter unless you can get the data to follow a consistent pattern. AND possibly take advantage of the fact that mailing label lines whose tokens evaluate to empty strings are skipped (so if the partner name was formatted on a 2nd line, the tokens and the line would be ignored for contacts w/o partner values.
Protect your investment in CiviCRM by  becoming a Member!

rogerco

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 5
Re: Customized Greeting
August 20, 2008, 01:01:58 am
I'm dealing with a similar situation by using the Household address facility.

Before importing the contact data from a spreadsheet which was in the same mess as yours with names and partners all over the place I spent some time cleaning it in to get a separate row for every individual with name colums correct. I then imported the unique addresses as households and used the nickname field to import the desired household greeting and then a second import to bring in all the individuals with 'use household address'.

So now I define the greeting for the household and use the household address to print labels where one letter is going to joint individuals.
I can then use the individual address and greetings if I need to mail to every individual. eg Newsletters (paper) go one per household, but ballot papers have to be addressed to the individual.

(There are other problems with household addresses though to do with how the individual address gets updated when the household address is edited - it doesn't if you do it through a profile form)

RogerCO
« Last Edit: August 20, 2008, 01:06:39 am by rogerco »

millionleaves

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
    • Millionleaves
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Customized Greeting
August 25, 2008, 10:04:44 pm
Thanks. I should be able to use these thoughts to get something working.

In the meantime, I took the social engineering route - convince the client to do it the least complicated way! However, we'll still have the challenge with physical mailing labels and I hadn't explored that functionality yet, so your input above will prove very useful there.
Millionleaves - CiviCRM and Drupal services for New Zealand and the world
http://www.millionleaves.com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Customized Greeting

This forum was archived on 2017-11-26.