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) »
  • Employer Organization name on labels, but not when home address is primary
Pages: [1]

Author Topic: Employer Organization name on labels, but not when home address is primary  (Read 797 times)

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Employer Organization name on labels, but not when home address is primary
February 24, 2011, 11:52:47 am
Hi,

I'm just trying to get my head round some requirements around addressing and I've searched around the forum and other places to understand how to include the employer's organization name on mailing labels.

I know I can add {contact.current_employer} token to insert the name in the address block but how do I set it so that it only adds the org. name when the primary address is set to 'work' (or is the shared address of the employer)?

My problem is that if contact A has employer B but their primary address is set to Home then when I create labels (or in a dpf merge) I don't want the employer name present as it is going to their home address if another contact D has employer E and their primary address is set to Work then I do want the employer name to show as well as the work address.

Hope that makes sense.

Do I need to hack some PHP to do an if statement on that smarty tag or something?

Cheers,

Dave

mjonas

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.0.3
  • CMS version: Drupal 7
  • MySQL version: ?
  • PHP version: ?
Re: Employer Organization name on labels, but not when home address is primary
October 20, 2011, 07:01:23 am
Same here..

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: Employer Organization name on labels, but not when home address is primary
October 20, 2011, 07:23:07 am

I suspect u'll need to do this via a token hook. The token value is conditional based on the primary address location of the contact

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) »
  • Employer Organization name on labels, but not when home address is primary

This forum was archived on 2017-11-26.