Aggregator Value Expression | Community
Skip to main content
RLepoudre
Level 2
November 21, 2024
Solved

Aggregator Value Expression

  • November 21, 2024
  • 1 reply
  • 626 views

So right now I'm using the following code to display the number of tasks added on to a project beyond the original template. 

aggregator.displayformat=int aggregator.function=SUM aggregator.namekey=totalTaskCount aggregator.valueexpression=SUB({totalTaskCount},14) aggregator.valueformat=int displayname=Touchpoints namekey=totalTaskCount querysort=totalTaskCount valueexpression=SUB({totalTaskCount},14) valuefield=totalTaskCount valueformat=int viewalias=totalTaskCount

This works fine, but if the number of template tasks ever change from 14, the number in the column will be wrong. 
What I'd like to do is change the value expression to count the number of children tasks under a specific parent task. However, I'm not sure how to go about writing that expression since I'm looking for a task name on a project report. I would be able to figure it out with nested lists, but I'm new to aggregates. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by monicacardoso

Hi @rlepoudre

 

Thank you for your question! You mentioned that if the number of template tasks ever change from 14, the number in the column will be wrong; this is because in your "SUM" expression, you are hard coding the number 14. If the total number of template tasks changes, this number remains as 14 and causes the wrong result to be produced. 

 

To exclude parent tasks, we usually state "numberOfChildren_Mod=notnull" in textmode. Here are some articles that provide aggregate samples, so that you can learn further: https://experienceleague.adobe.com/en/docs/workfront/using/reporting/reports/custom-view-samples/custom-view-filter-grouping-samples

 

If you still need assistance with this, I would recommend gathering specific report links and submitting a support ticket so that our team can look into this further. 

 

- Monica

1 reply

monicacardosoAdobe EmployeeAccepted solution
Adobe Employee
December 2, 2024

Hi @rlepoudre

 

Thank you for your question! You mentioned that if the number of template tasks ever change from 14, the number in the column will be wrong; this is because in your "SUM" expression, you are hard coding the number 14. If the total number of template tasks changes, this number remains as 14 and causes the wrong result to be produced. 

 

To exclude parent tasks, we usually state "numberOfChildren_Mod=notnull" in textmode. Here are some articles that provide aggregate samples, so that you can learn further: https://experienceleague.adobe.com/en/docs/workfront/using/reporting/reports/custom-view-samples/custom-view-filter-grouping-samples

 

If you still need assistance with this, I would recommend gathering specific report links and submitting a support ticket so that our team can look into this further. 

 

- Monica