Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Say I have a Group, a content type.
Say I have Members, another content type.
Members belong to a Group, via an entity reference.
Drupal users can flag Members.
I'd now like to display something like "You've flagged XX out of YY members of this Group" and, preferably, within a View. Is this possible? Similarly, when viewing a Member, I want to show "XX out of YY Drupal users have flagged this Member", within a View? Is this possible? I know I could rig this up with a Computed Field or Pseudo Field, but I'd prefer a View amalgamation somehow, if possible.
Comments
Comment #2
Morbus IffComment #3
Morbus IffComment #4
joachim CreditAttribution: joachim as a volunteer commentedIf your view is showing all the groups, then you could possibly do it with aggregation: add the relationship to members, then to the flagging on members, then aggregate on the flagging entity's UID field.
That should collapse the members back to having one row per group.
Comment #5
ptmkenny CreditAttribution: ptmkenny commentedClosing because #4 provides a possible approach and there has been no follow-up after 3 years.