Skip to main content

GROWING AND SUSTAINING RELATIONSHIPS

GROWING AND SUSTAINING RELATIONSHIPS
Close
Monica Tapia A.

End-User and promoter in Latin America

Alternativas y Capacidades

http://www.alternativasycapacidades.org

Our capacity organization manages a largely segmented contact list for bulk mailing, events, training, groups and donors.
We are helping other organizations gain advocacy capacities, managing constituency making, campaigns and petitions

GROWING AND SUSTAINING RELATIONSHIPS
Close
Sushant Paste

Developer

Implementors and Developers

http://osseed.com

Worked with CiviCRM as core team developer for more than 2 years. Now we are working as a team and providing service with CiviCRM installation, customization and training. One thing about CiviCRM community is that it's very healthy and really helpful. It's really great that i am part of this community and we want to grow this more and more . Also whatever the problems we are facing there is a solution on forums, or we will get the proper guidelines to solve the issues. Big salute to the CiviCRMcommunity :)

GROWING AND SUSTAINING RELATIONSHIPS
Close
Coleman Watts

End-user and Developer

Woolman Sierra Friends Center

http://woolman.org

If it weren't for CiviCRM we'd be using at least 5 different
systems for Woolman: one for donor management, another for email newsletters, a third for our school enrollment, a fourth for our summer camp registration, and then a whole bunch of spreadsheets for keeping track of things like event attendance, prospective students, CSA memberships, etc. And of course none of those systems would talk to each other or make it possible to get a whole picture of the many ways one person might participate in our education center's activities. Migrating all of our scattered data and disparate systems to CiviCRM was a long and challenging process, but the results have been more than worth it. Our ability to track and report on our programs has improved dramatically, while the burden on staff to do data entry has been greatly reduced, and our participants are happy that they can now register/enroll online rather than mailing or faxing paper forms.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Bryan Cole

Implementor

BackOffice Thining

http://www.backofficethinking.com

CiviCRM is one of the core offerings of our company. Remaining close to the CiviCRM community is important to us, as it keeps us close to new developments in the tool, and allows us to offer our feedback for new releases.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Rachel Daniell

end-user, implementor

consulting/multi

CiviCRM provides a vital tool whereby nonprofits and other social projects can implement strong contact-relationship management capabilities without high monthly fees. It also provides the integration and customization capabilities necessary to make such software useful in the complex, lived reality of doing social engagement work. Plus it continues to build the open source toolset made available to the Commons and grow the common good.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Young-Jin Kim

Developer, Implementor, Trainer

Emphanos

http://emphanos.com

The community around CiviCRM is both welcoming and vibrant. CiviCRM as a software solution is a powerful and flexible data management solution for a vast array of nonprofit organizations ranging from the startup NGO to the established multi-million dollar foundation. In our daily work we are seeing more and more NPOs moving away from proprietary systems and single vendor SaaS solutions and embracing the open source community around CiviCRM. Organizations using CiviCRM love the extensibility and the freedoms that come with open source, freedom to choose hosting, freedom to choose project partners, and the freedom to re-use, re-purpose and re-deploy without paying extra.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Jamie McClelland

DEVELOPER AND IMPLEMENTER

PROGRESSIVE TECHNOLOGY PROJECT

http://progressivetech.org
GROWING AND SUSTAINING RELATIONSHIPS
Close
Paul Delbar

Implementor, Developer

delius

http://www.delius.be

CiviCRM is a viable alternative for small and medium-sized non-profits.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Jake Martin White

Implementor, Developer

PeaceWorks Technology Solutions

http://www.peaceworks.ca

PeaceWorks provides technology solutions for not-for-profit organizations. CiviCRM fills an important niche among our clients who need a flexible, comprehensive, user-friendly, web-integrated CRM solution.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Joshua Walker

Developer / Contributor

Drastik by Design

http://drastikbydesign.com

CiviCRM has one of the best open source communities out there. It's always a blessing when I get the opportunity to do my next project in CiviCRM.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Kevin Krupp

Trainer

Emphanos

http://emphanos.com

As a CiviCRM trainer and implementer CiviCRM provides a great solution that allows Emphanos to help NGOs improve their ability to reach out and spread their messages.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Kasia Wakarecy

Administrator, Implementator, Developer, End-user

Freeform Solutions

http://www.freeformsolutions.ca

Freeform Solutions uses CiviCRM for our internal CRM. We are also a NFP IT support organization and we implement CiviCRM for NFP organizations we work for because we find that CiviCRM is the best open source CRM out there.

LOGIN | REGISTER
  • Create new account
  • Request new password

Search form

  • BLOG
  • DEMO
  • Find An Expert
  • NEED HELP
  • SUPPORT US
  • DEVELOPER RESOURCES
CiviCRM Community Site logo CiviCRM Community Site
  • WHAT IS CIVICRM
    • Community
    • Case Studies
    • Experts
    • Contributors
    • Core Team
    • Licensing
    • Contact Us
  • WILL CIVICRM MEET YOUR NEEDS?
    • Contacts
    • Contributions
    • Communications
    • Peer-To-Peer Fundraisers
    • Advocacy Campaigns
    • Events
    • Members
    • Reports
    • Case Management
  • GET STARTED
    • Evaluate Your CRM Needs
    • Evaluate CiviCRM Features
    • Read Books
    • Contact an Ambassador
    • Demo CiviCRM
    • Download CiviCRM
    • Download Extensions
    • Find An Expert
  • PARTICIPATE
    • Join the community
    • Make it happen
    • Support CiviCRM
    • Meet ups
    • Document CiviCRM
    • Translate CiviCRM
    • Developer resources

You are here

Home » Blogs » Adam Wight's blog

Blog

  • API
  • Architecture Series
  • CiviCampaign
  • CiviCase
  • CiviCon
  • CiviContribute
  • CiviCRM
  • CiviCRM v4.1
  • CiviEvent
  • CiviMail
  • CiviMember
  • CiviMobile
  • CiviPledge
  • CiviReport
  • Documentation
  • Drupal
  • Extensions
  • Finance and Accounting
  • Interface Design and Layout Standards
  • Internationalization and Localization
  • Joomla
  • Make it happen
  • Marketing and Promotion
  • Meetups
  • Older Versions
  • Release
  • Schools
  • Solutions (case studies and user stories)
  • Sprints
  • Teams
  • Training
  • v1.6
  • v1.7
  • v1.8
  • v1.9
  • v2.0
  • v2.1
  • v2.2
  • v2.3
  • v3.0
  • v3.1
  • v3.2
  • v3.3
  • v3.4 and v4.0
  • v4.2
  • v4.3
  • WordPress

Developing custom search results

Submitted by Adam Wight on January 2, 2013 - 18:21

These features were quite a roller-coaster to implement as an extension.  In the end, I made some small core customizations, which are not good enough to commit, but might be inspiring to fellow travelers.  The extension code itself is alarmingly hacky, and to spoil a long story, doesn't work in production ;)

The goal was to allow a Civi admin to go to the Advanced Search page, enter criteria and then view results as a list of contacts, with all that individual's contributions appearing in an indented list below the contact.  Selected data would then be exported in a maximal form, with all available info about the contact, and a list of their contributions laid out as columns on that person's spreadsheet row, along with various, calculated LYBUNT flags.

 

Custom Advanced Search Results

First, it turns out that advanced search results (called "modes" in the source code) come in a small number of flavors.  I wanted to print both contact details and contribution details, so I had to write a new result type.  Here, I used a common trick which is useful for almost any project: I created a new CRM_Utils_Hook handler, and implemented the hook in my extension. This limited the CiviCRM changes to one line, making release upgrades much simpler than if I had put all my logic in core.  It's not always possible to do things this way, especially when you want to change existing functionality rather than simply augmenting it.

My implementation of an advanced search mode was probably the most difficult component of this project, and I'm not sure it will be any easier the next time.  Note the many commented-out calls to "dpm" in the Devel module :P  Luckily, it was actually possible to display results as multi-line records from within the template.

Custom Export Mapping

The real fun came when I wanted to get the contact & contributions data into a spreadsheet.  I needed to run custom PHP and SQL to generate the data, so I had to override several steps in the export process.  My solution begins with a drupal update hook to programatically create a new export mapping in the schema.  I've added a new search results task which exports from the advanced search results list, including all the fields from my custom export mapping and overriding the usual field mapping selection screen.  Then, extension code performs calculations on these export values and rolls each contact up into a single row.  See wmf_reports.module for the top-level logic needed to implement this workflow.

 

Failures

The first blocker was a mysql JOIN limitation.  It turns out that you can only join 61 tables in a single SELECT statement, and my custom export mapping plus the built-in tables exceeded that number.  Luckily, I was close enough that cutting out a few export fields overcame that limit.  Specifically, there was a join performed for each phone and address location type, so I decided the "primary" values should be good enough in this case.

Finally, the export worked quite well on my development system, but died without throwing any errors on production.

 

References

  • Core hacks: http://www.mediawiki.org/wiki/Special:Code/Wikimedia/1898
  • Module code: http://svn.wikimedia.org/viewvc/wikimedia/trunk/fundraising-civicrm/sites/all/modules/wmf_reports/
  • Adam Wight's blog
  • Log in or register to post comments

Comments

Thanks for sharing

Permalink Submitted by xavier on January 4, 2013 - 04:06

Great work.

Do you think the code to create export mapping is "clean enough" to allow to create a new entity ExportMapping to wrap it?

 

WHen you mean it doesn't work in production, the "only" roadblock is that we have to patch the core or is there another problem?

  • Log in or register to post comments

CIVICRM


GROWING AND SUSTAINING RELATIONSHIPS

WHAT IS CIVICRM
  • Community
  • Case Studies
  • Experts
  • Contributors
  • Core Team
  • Licensing
  • Contact Us
WILL CIVICRM MEET YOUR NEEDS?
  • Contacts
  • Contributions
  • Communications
  • Peer-To-Peer Fundraisers
  • Advocacy Campaigns
  • Events
  • Members
  • Reports
  • Case Management
GET STARTED
  • Evaluate Your CRM Needs
  • Evaluate CiviCRM Features
  • Read Books
  • Contact an Ambassador
  • Demo CiviCRM
  • Download CiviCRM
  • Download Extensions
  • Find An Expert
PARTICIPATE
  • Join the CiviCRM Community
  • Read Our Blog
  • Community Forum
  • Attend a Training or Meetup
  • Make It Happen
  • Become A CiviCRM Developer
  • Issue Tracker
  • Help with Documentation
  • Translate