Skip to main content
10-Marble
November 25, 2024
Solved

Recursion: Aggregation rule for a computation field

  • November 25, 2024
  • 2 replies
  • 724 views

Hi,

I'm looking for an option how I can consume child computed field value in the parents field. Means I'm looking for the recursion - I need to use Aggregation rule in computation field which is not possible ootb - as soon you define "Computed as" for the field, the Aggregation rule (sum/total) gets deactivated.

My use case: I need the information available here in screenshot in a separate tracker field, to reuse it for another use case.:

Screenshot 2024-11-25 143251.png

 

The problem is, I can calculate children of a parent by using "Computed as = length(children)" but it counts 1st level children only. Therefore I thought I can work with Aggregation rule, but it is not possible for fields where "Computed as" is defined. Any ideas how I could solve that problem. Thank you!

Best answer by Alexej_L

Solved by using following computation in "Computed as" for my customField[1]:

length(children)+sum(children.{child|child.customField[1]})

2 replies

Catalina
Community Moderator
November 29, 2024

Hi @Alexej_L 

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.

 

Best regards,

Catalina | PTC Community Moderator
Alexej_L10-MarbleAuthorAnswer
10-Marble
March 12, 2025

Solved by using following computation in "Computed as" for my customField[1]:

length(children)+sum(children.{child|child.customField[1]})