Code to show the predecessor number, name, and parent name in a calculated custom field | Community
Skip to main content
Level 2
April 3, 2025
Solved

Code to show the predecessor number, name, and parent name in a calculated custom field

  • April 3, 2025
  • 1 reply
  • 402 views

I need to be able to group and bar chart a task report by the current task's predecessor's parent name.

 

I've created columns on the task report that show the correct results using this text mode:

 

Predecessor name: 

displayname=Preceding Task
listdelimiter=
listmethod=nested(predecessors).lists
type=iterate
valueexpression={predecessor}.{name}
valueformat=HTML

 

Predecessor parent name: 

displayname=Predecessor parent name
listdelimiter=
listmethod=nested(predecessors).lists
type=iterate
valueexpression={predecessor}.{parent}.{name}
valueformat=HTML

 

However, I'm unable to group or chart with these values. 

 

So I'm thinking of creating a calculated field on the task that captures the predecessor and predecessor's parent so that grouping and charting will be possible. But, I can't figure out the code because {predecessor} is invalid.

 

Any suggestions on the field calculation, or how to group by the text mode column?

 

 

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 Sven-iX

Right - you can't, sadly. 

In calculated fields we don't get to use collections, which predecessors is. 
And you can't group or chart a column that dynamically renders content.

I'm not clear on the use case here - can you explain?

1 reply

Sven-iX
Community Advisor
Sven-iXCommunity AdvisorAccepted solution
Community Advisor
April 3, 2025

Right - you can't, sadly. 

In calculated fields we don't get to use collections, which predecessors is. 
And you can't group or chart a column that dynamically renders content.

I'm not clear on the use case here - can you explain?