I am trying to write a Drupal View (with VBO) to show CiviCRM Contacts with the Event Participant records which they are related to. But there is no suitable Relationship in the standard list. I have enabled both Contact and Participant (and Event) entities in Civicrm_Entity, and would presume that this is where the Relationship would be generated as well.

I can use the hook_views_data_alter() to create the Relationship, so there is no fundamental reason why it should not work.

Is there a reason why Civicrm_Entity does not provide this, or is it a bug?

  • d7 or d8 - pls tag accordingly
    – petednz - fuzion
    Nov 10, 2020 at 18:09
  • CiviCRM Entity for D8 has this capability. Starting from a base table of contacts, you should have a "CiviCRM Participant using contact_id" relationship available. Nov 10, 2020 at 19:13

1 Answer 1


We do have D7 VBO Views like this for clients -> key is to start with a CiviCRM Participant View - so that the base table is civicrm_participant - from there you can add a Relationship to the Contact to get at the Contact fields like Last Name etc.

Note there there is a bug in the API in that after updating participant status. It will change is_test to = NULL and that removes the Participant record from the CiviCRM UI.

One solution that jackrabbithanna pointed out is to expose the is_test field as well and then specifically add 0. I've not tried that yet though!

enter image description here

  • Yes, I had thought of that way of doing it, but the query includes Contacts who do not have associated Participants, so starting with Participants wouldn't work. Also the VBO action naturally relates to Contacts not Participants.
    – user6274
    Nov 13, 2020 at 9:52
  • It still seems curious that this particular Relationship is omitted.
    – user6274
    Nov 13, 2020 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.