Expand my Community achievements bar.

Don't miss the Workfront Community Lens, June Edition!
SOLVED

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

Avatar

Level 2

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?

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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?

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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?