15

No custom code required! If you're on Drupal Views integration, which ships with CiviCRM - all that's required here are Drupal modules Views, Views PDF and installation of two libraries for the PDF generation: tcpdf and fpdi; Here are the steps: First we will create a Membership tab in your Drupal /user screen where we will display the relevant Membership ...


11

It is the regular Drupal Views module, but if you have Drupal and CiviCRM in separate databases, you have to edit your settings file to let Views know where to find the CiviCRM data. (Coleman notes in addition: "if your drupal sql user and civicrm sql user are different then you need to grant SELECT privileges to the drupal one for the civi db.") You can ...


9

You can use the relationship section of a view for this. A relationship in a view is a relationship between entities don't confuse it with the relationship you have between contacts. So you could set up a view relationship starting from contact a (the a side of the civicrm relationship), or from contact b (the b side of the civicrm relationship). This a ...


9

To answer your question, I wrote a module: https://www.drupal.org/project/civimenu The code snippet I posted below probably wouldn't work because of timing issues (by the time the block was being printed it's too late to add the header). Seemed better to package it up into a module. Enjoy.


9

Leaftlet is an open-source JavaScript Library for interactive mobile friendly maps. It only takes a few minutes to put your CiviCRM Contacts on a Leaflet Map if you're using Drupal. Here are some of my slides from my CiviCON 2016 lightning talk: EDIT: Some additional notes based on comments below and some questions emailed to me: To get started with CiviCRM ...


7

Saw the same issue here. We noticed that the field appeared twice in the list of fields. We'd selected it as CiviCRM Contact: My Field - but it also appeared as CiviCRM Custom: My Field. When we selected it as CiviCRM Custom: My Field, it worked.


7

No aggregation necessary. Under relationships add two relationships for activity contacts. Select one to be the source and the other to be the target. Once you've got those relationships, you can add two display name fields. One tied to the source relationship and one tied to the target relationship. Under filters add activity is deleted false, ...


7

Here's my solution for achieving the three goals outlined in the question. I may edit this a bit as I find errors and where commenters declare confusion. First, the caveats. Second, some info about relationships in CiviCRM. Third, building the view. Caveats I am writing this as a tutorial as if you are following along. Obviously you won't have the ...


7

In your view, pull in the CiviCRM birth date field. Under date format, select Time ago. This will present the D.O.B. field as 40 years 7 months To remove years and months from the output you can ‘Rewrite results’ in the view and ‘Trim this field to a maximum length’ and set ‘Maximum length’ to 2 characters


6

We've done this with OpenLayers https://www.drupal.org/project/openlayers and Openlayers Proximity https://www.drupal.org/project/openlayers_proximity I wrote a blog article which in part describes how to create a OpenLayers map and Openlayers Map Views overlay with CiviCRM Event location plotted on a map. This should give you enough pointers to design your ...


6

If you prefer a solution which is editable via a web GUI, then Drupal Views are a great flexible approach. We use them extensively. You may hit the occasional limitation (either a "Views-ism" or a lack of support for some minor feature) but that's rare. If you are comfortable with Views, you'll be right at home :) If you prefer writing SQL and are ...


6

To create a Drupal relationship in a View for contacts A - B or B - A you need to add 2x Drupal relationship. In the case of starting with the Org assuming it as at the B end of the relationship, first you choose the option that says CiviCRM Contacts: CiviCRM Relationship (starting from Contact B) and configure that with the relevant Relationship Type ...


6

I had the same problem today, so I looked in the source code. In civicrm.install there's a function called _civicrm_get_db_config. It's looking in the $databases array for an element with a key civicrm. So I added this to settings.php: $databases['civicrm']['default'] = array ( 'database' => 'civi_db_name', 'username' => 'mysqluser', '...


6

Below please find some screenshots to illustrate how to do this: 1. This is a View of Activities. Each Activity has an Update button [that's a Global: Custom Text field -> Text Update; Rewrite results: Output this field as a link -> to the webform URL with case-worker-form?cid2=[contact_id]&aid=[id] and bootstrap classes btn to make it a button] -> the ...


5

This is an update to the answer given by petednz - fuzion. In my case I needed to create a view which showed a list of all employees of the organisation employing the currently logged in employee. In other words if a contact is logged into the website (Drupal), they can see the details for their organisation and all the employees of their organisation. I ...


5

I am not sure from the question whether each relationships is connected to the original contact, or if some might be daisy chained eg Parent to Student to School etc. In case it is the latter, here is a snip from an old forum post which might help CONNECT A to B Add DV relationship 1 of type "Connects a contact (as contact A) to a relationship." (eg ...


5

The culprit is often the website field which has no filters that enable you to specify which of a number should show and hence they produce multiple rows. But like others say, it could be Address, Email or Phone if you haven't specified either the location type or Primary only. Or multiple relationships etc.


5

All right...I did it but just wanted to follow up. Expand Advances in the View UI, click next to Aggregation on the word No. Turn it on. Now Add the Scheduled Activity Date field. Click Apply, then the Aggregation options will pop up. Select Maximum in the drop down list. Then click Apply. Here is part of my output (with other fields too of course).


5

It looks like CiviCRM is trying to insert some "Managed Entities" which already exist in the DB. Certain actions within the Drupal CMS will trigger CiviCRM to attempt this, and enabling / disabling modules is one of them. What I might do in this situation (if I had to fix it without upgrading CiviCRM) is: Make a backup of your DB. Make two. Look in CiviCRM'...


5

I believe you can connect your civiContact view to the membership fields without using that smart group. I have had success (in views 3) in the past with a civiContact based view using a relationship civiCRM Contacts: Drupal ID and a contextual filter User: UID that is configured to provide a default value from the logged in user when none is available. ...


5

Nevermind, figured it out - had to create a Relationship to CiviCRM Contacts: Drupal ID. Issue resolved.


5

Since yesterday you can now do that if you're using Drupal! @jackrabbithanna (Mark) added some code to CiviCRM Entity Project, which now exposes civicrm_contribution_recur as an Entity in Drupal so that you can manipulate it in Drupal like any other Entity. Will post some steps/screenshots here: git clone https://github.com/jackrabbithanna/civicrm_entity....


5

Found it! To limit views results to the current user, you want to: Create a relationship Go to Advanced > Relationships > Add 'CiviCRM Contacts: Drupal ID' Add the filter criteria User: Current (Yes) On the Relationship dropdown, select Drupal User


5

In most cases this is fixed by running drush cc all. I don't know what the circumstances are that causes the upgrading 'clear caches' to not suffice but this seems to be the fix. If 'Clear Caches' does not suffice you could also try Structure > Views > Settings > Advanced, Clear Views' cache but I have never needed to do that.


4

How about adding another activity status? Like "Unread" or "Read". Depending on how skilled you are, maybe it is possible to have inbound sms set to "Unread" as default. Then your staff could change it to "completed" when they have read it. If not, you could add the activity status "Read" and then change the status from "Completed" to "Read". In both ways,...


4

Why this is happening depends very much on how your View is set up, providing an export of the View might help us investigate. One thing that might help is turning on the 'Distinct' option in the View, to force only one of each result appearing. This can be done whilst editing the View, under: Advanced > Other > Query settings > Tick 'Distinct'


4

Extrapolating on Coleman's answer, you can get the json output required by creating a new Drupal page with hook_menu. Here is the full code: function mymodule_menu() { $items['civicrm-videos/%user/json'] = array( 'access callback' => true, 'page callback' => 'mymodule_output_my_view_json', 'delivery callback' => 'drupal_json_output', ...


4

I'm not sure how the "things" would fit into this model, but I might begin to tackle the child/person sponsorship this (Drupal-specific) way: Create a custom field for individuals (and/or potentially use a separate sub-type based on Individual) to indicate that they are available for sponsorship Create a relationship such as "Sponsor of/Sponsored by" Create ...


4

You will need to add the field manually to: drupal/modules/views/components/civicrm.core.inc and then submit a PR to civicrm-drupal repository, so the fix gets merged into the main code base. In D8, the situation is a lot better, as torrance has automated the process and the fields and their definition get picked up automatically. So a lot cleaner and ...


4

There are three ways to do this. Lobo detailed one of them, and alluded to work done for D8 to automate this - but similar work has been done for D7 as well. The other two options each involve installing a module: Either civicrm_entity 2.0, or Views CiviCRM Expose Tables. Views Expose Tables can expose every field in every CiviCRM table. CiviCRM Entity ...


Only top voted, non community-wiki answers of a minimum length are eligible