Okay, I've a two content types "A" and "B". "A" is a parent and have a field referenced(Entity Reference) to the child content type "B". Now I've created a View(Table) with a list of "A". And I want to add a field to show the SUM of field values from the referenced type "B". How to do this? Is it possible to solve with a Rules?

2 Answers 2

  1. Under Relationships, add a relationship for the desired field. "Entity Referenced". Not "Entity Referencing".
  2. Under Fields, add the field you want to sum. Add the relationship in the field settings.
  3. Under advanced, enable Use Aggregation.
  4. Under fields, click Aggregation Settings next to the field and choose "Sum".
  • But any way to make it by Rules? I've tried to create a component and now can reach a field in a referenced entities but only with a Show message action. Other actions can't give me an access to this fields.
    – Ole
    Commented Sep 14, 2016 at 19:53

Okay, I've managed to find a solution via components. But to make component work fine in a loop with a entity referenced fields, add a "Entity is a bundle" condition. Because "Entity is a type" or "Content is a type" doesn't work for me.

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.