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) »
  • Publishing Searchbuilder results to Drupal
Pages: [1]

Author Topic: Publishing Searchbuilder results to Drupal  (Read 1878 times)

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Publishing Searchbuilder results to Drupal
September 22, 2011, 06:21:51 pm
I am looking to improve the capabilities of a search page on a site (Drupal 6 / civiCRM 3.4.5).

Currently we have exposed civiCRM "Individual" custom data to Drupal's Views module and have created a search results view. It works well but there have been several occasions where the view has crashed and the search filters are ignored so all of the records are listed out in the search results page regardless of weather they are supposed to be in the search index or not. The fix is to clear Drupal's cache but there is no rhyme or reason for the crash so I am looking for a different method. I'm looking at Search Builder on the civiCRM side.

What I would like to do is be able to create a search input page (in Drupal) with all of the criteria that I would like to search for and run it directly against civiCRM the way the search builder does and then provide the results page in Drupal. I'm looking for something programmatic as using iFrames and that sort of thing will not do.

My current search page consists of two searches. A last name search that has a single filed and a submit button and a full search that contains a few hundred possible criteria in several drop down lists.

Any thoughts?

Thanks,
Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Publishing Searchbuilder results to Drupal
September 23, 2011, 12:02:52 am
Could you use the API to perform your searches and retrieve data which you can then display in Drupal?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Publishing Searchbuilder results to Drupal
September 23, 2011, 03:30:56 am
> I'm looking for something programmatic

I don't think the API will help you run a complicated search, but this can be coded in PHP/MySQL using CiviCRM's DAO inside of a Drupal module.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Publishing Searchbuilder results to Drupal
September 23, 2011, 03:39:59 am
Test first using the api explorer.

Pretty much all the criteria that can be found using the advanced search can be used in the api

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Publishing Searchbuilder results to Drupal
September 23, 2011, 03:45:40 am
Agree with X, I would try the API first.....I would imagine it can actually give you all you need.
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: Publishing Searchbuilder results to Drupal
September 23, 2011, 09:09:28 am
Fantastic! Thanks for the nudge in the right direction.

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Publishing Searchbuilder results to Drupal

This forum was archived on 2017-11-26.