- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2024 03:08 AM - edited ‎02-05-2024 03:14 AM
I'm trying to collate the total of a duration field for all child tasks, where the multiple duration field values are gathered in an array. In this scenario there is a dedicated field on change requests totalling a specific type of action in duration format by the change implementer... in essence this dictates how much effort the change implementer actually spent on certain actions for the change in manhours, not how long the change took. Project owners would like to be able to occasionally calculate how much actual effort certain actions take on changes relating to a project.
Rather than have different BRs running on each child task when they're saved, a single calculation has been asked to be done when a project form is saved which will then calculate the effort for all changes related to that project, so I've provided this Business Rule to run when a project form is saved.
===========================
===============================
When I output the value of 'totalEffortChange' as an array without the loop in the script it's displayed in the logs as I expect : "The total value of totalEffortChange is: 107100000,2100000"
However, when I use the loop I get the following: "The total value of totalEffortChange is: 107100000107100000,2100000107100000,2100000"
I've never had to calculate the total values of an integer from a looped array before and whilst I've tried different formats but it doesn't seem to calculate correctly. How do I reformat the above to calculate the total value of the integers in the array?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2024 03:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2024 03:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2024 03:28 AM
Thanks @Pranesh , wow that was quick and this is now working.... my thanks and appreciations, that really helped! 🙂