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) »
  • Civicrm 4 Drupal 7: How to allow multiple values for a contextual filter?
Pages: [1]

Author Topic: Civicrm 4 Drupal 7: How to allow multiple values for a contextual filter?  (Read 2065 times)

pamreed

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.04
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Civicrm 4 Drupal 7: How to allow multiple values for a contextual filter?
July 30, 2011, 07:25:55 pm
Hi

I need to pass multiple zip codes to the view all contacts within all the zip codes. I need to know the format to pass the list of zip codes as arguments to the view for a contextual filter. Plus it looks like the sql is not being create correctly.

I tried passing in the following ways
1. 55359 55405 55118
2. 55359,55405, 55118
3 55359+55405+55118

If I pass just one zip code it works fine but not when passing in multiple. It looks like missing the options to tell 'Allow multiple values' on the Configure contextual filters' under the More area.

Using Drupal 7.4, Views 3.0-rc1, and Civicrm 4.0.4

Any help would be greatly appreciated. Let me know if you need more information.

Thank you,
Pam

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: Civicrm 4 Drupal 7: How to allow multiple values for a contextual filter?
July 31, 2011, 01:08:22 am

I suspect that the integration code does not offer the features you are looking for. Would be great if you can take a look at the code in: drupal/modules/views/*

and see how you can expand on it and add the things that you are looking for.

Please do submit your patches back so others can benefit

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 Drupal Modules (Moderator: Donald Lobo) »
  • Civicrm 4 Drupal 7: How to allow multiple values for a contextual filter?

This forum was archived on 2017-11-26.