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) »
  • Search exposed ContactRef field in Views
Pages: [1]

Author Topic: Search exposed ContactRef field in Views  (Read 546 times)

davyivins

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 2
    • PURCO SA
  • CiviCRM version: 4.5
  • CMS version: Drupal 6.33
  • MySQL version: 5.5.34
  • PHP version: 5.4.33
Search exposed ContactRef field in Views
February 04, 2015, 06:52:54 am
D6, Civi4.5.5

I have a custom contact ref field in CiviMember which allows users to select from a list of individuals. The list is populated from a Civi group.
I have a Drupal 6 View (CiviMembership) with that field exposed.

The View lists the individual's names correctly, but in order to use the exposed search I have to input the contracts CiviCRM ID.
Is there a way to use the contact's name, rather than ID in the exposed field?

Thanks!
There are times I love technology...and then there are times I *love* technology :-)

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Search exposed ContactRef field in Views
February 04, 2015, 06:59:51 am
I think views integration has been improved a lot in D7, but you could work around your problem by using the views_custom_field module and then inserting a bit of php in that field to call the civicrm_api and fetch the contact's name.
Try asking your question on the new CiviCRM help site.

davyivins

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 2
    • PURCO SA
  • CiviCRM version: 4.5
  • CMS version: Drupal 6.33
  • MySQL version: 5.5.34
  • PHP version: 5.4.33
Re: Search exposed ContactRef field in Views
February 04, 2015, 07:05:59 am
Thanks Coleman - quick and helpful as always!

Now if only I knew how to write the requisite php  :'(
If anyone has nothing better to do with their time and could help I'd be really grateful. But no pressure as  I do have people I can ask tomorrow.
 ;D ;D
There are times I love technology...and then there are times I *love* technology :-)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Search exposed ContactRef field in Views

This forum was archived on 2017-11-26.