I am trying to build a view that displays each CiviCRM contact and the sum of the duration of all their recorded activities. I would also like to distinguish contacts in the view whom's duration sum is greater than x minute either with an icon or different color or font.

Any thoughts on how I can accomplish this?

2 Answers 2


This is more of a Drupal question - you can do what you're looking for with the Views Conditional module.

  • Thanks for recommending that module. It does trigger based on the duration field but NOT based on the sum of the duration field. I am using views_aggregator to give me a total sum of all activity durations. Any other ideas to work around this?
    – Yossi
    Commented Jul 19, 2017 at 0:03
  • Consider either the Computed Field module to create hidden fields to trigger on, or writing a module that injects 2-3 lines of jQuery? Commented Jul 19, 2017 at 14:44

So we managed to accomplish this. - I used a module called views_aggregator to display the sum total duration of all the activities for each contact - I then created another view and did the same but filtered the results to only show contact with a total activity duration > x and rewrote the results to only display a badge - then used the module views_field_view to display the badge from view2 next to the corresponding name in view1

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.