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 Drupal Modules (Moderator: Donald Lobo) »
  • using a 'country' field in Drupal Views displays 4 digit code
Pages: [1]

Author Topic: using a 'country' field in Drupal Views displays 4 digit code  (Read 969 times)

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
using a 'country' field in Drupal Views displays 4 digit code
August 08, 2014, 04:12:59 am
We're making a Drupal View to list, amongst other things, the selected country from a custom field linked to an activity (uses CiviCRM's country select field type).

The View displays the output as the four digit code that Civi stores rather than the country name.

I spotted this issue (https://issues.civicrm.org/jira/browse/CRM-4221), that appears to have been resolved some way back, so I'm wondering if this problem may have crept back in? Ot maybe we're just doing something wrong?

CiviCRM 4.4.6 on D7
Graham Mitchell
http://mc3.coop

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: using a 'country' field in Drupal Views displays 4 digit code
August 08, 2014, 02:44:15 pm
i can't promise this is on 4.4.6 - i mean the site says so, but eileen has a way of having us running on sites with eileen's special sauce - but I did check a View that shows Country and in the 'country field' i see
Type of display for country field
 Display two letter country code
 Display full country name
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: using a 'country' field in Drupal Views displays 4 digit code
August 08, 2014, 11:16:45 pm
Thanks petednz

No such level of sophistication available out of the box it seems. Wonder if you could ask Eileen where we can get the special sauce from?

From what we are seeing, Views seems generally unable to do anything other than the absolute basics with CiviCRM fields and often it is displaying stored values rather than the labels (the 4 digit code instead of country, a file url instead of the file name, etc.

Should we be using Eileen's CivicRM Entities module? I've spent a bit of time with it trying to do things with Rules - complicated - but wondering whether it adds value in terms of Views?
Graham Mitchell
http://mc3.coop

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: using a 'country' field in Drupal Views displays 4 digit code
August 08, 2014, 11:28:25 pm
hi graham - nope certainly not entities - and i have long had these fields running fine which is why i was going down your 'regression' suggestion.

Let me grab a View and attach so we can compare like with like including the query
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: using a 'country' field in Drupal Views displays 4 digit code
August 08, 2014, 11:50:04 pm
Thanks
I'm also wondering whether you use any other modules that might extend/enhance Views. We're just using the main Views module in this instance.
Graham Mitchell
http://mc3.coop

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: using a 'country' field in Drupal Views displays 4 digit code
August 09, 2014, 12:31:34 am
Just did some testing on a 4.5 beta site I have running locally, and that displayed all the style options you mention for a country field from a Civi contact address, but not for the custom country field.

Importantly the view displays the country name and not a code.
Graham Mitchell
http://mc3.coop

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: using a 'country' field in Drupal Views displays 4 digit code
August 09, 2014, 04:37:54 am
very sorry for not reading the OP. i hadn't taken in that you were talking about a custom country field - guess the handler just doesn't exist for this situation yet.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • using a 'country' field in Drupal Views displays 4 digit code

This forum was archived on 2017-11-26.