Expand my Community achievements bar.

Don’t miss the Workfront AMA: System Smarts & Strategic Starts! Ask your questions about keeping Workfront running smoothly, planning enhancements, reporting, or adoption, and get practical insights from Adobe experts.
SOLVED

Project Report using Nested Roles

Avatar

Level 4

I am trying to create a project report with a column that shows job roles associated with the project but the results include inactive job roles and other job roles not associated with the project. 

 

This is the code I used to display the roles. The valueexpression was added to exclude inactive roles, but it didn't change the results.

 

displayname=Nested Roles
listdelimiter=<p>
listmethod=nested(roles).lists
type=iterate
valueexpression=IF({role}.{ID}={project}.{role}.{ID},{name},"")

valuefield=name
valueformat=HTML

 

Does anyone have suggestions how to exclude job roles that are not associated with the project?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Base code - This will get you every role associated to every /task/ on the project, inactive or otherwise. That is not the same as every role associated to the /people/ assigned to things on the project. 

 

displayname=Nested Roles
listdelimiter=<p>
listmethod=nested(roles).lists
type=iterate
valueexpression={name}
valuefield=name
valueformat=HTML

 

This code will get you every role associated to every person assigned to something on the project:

displayname=Nested Roles
listdelimiter=<p>
listmethod=nested(projectUserRoles).lists
type=iterate
valueexpression={role}.{name}
valuefield=name
valueformat=HTML

If you want to see that with the user's name as well, this will do that. 

displayname=Project Users
listdelimiter=<br>
listmethod=nested(projectUsers).lists
type=iterate
usewidths=true
valueexpression=CONCAT({user}.{name}," - ",{user}.{role}.{name})
valueformat=HTML
width=200

 

To drop inactive records, this is a sample based on the first list, but would work the same on the rest too.

displayname=Nested Roles
listdelimiter=<p>
listmethod=nested(roles).lists
type=iterate
valueexpression=IF({isActive},{name},"")
valuefield=name
valueformat=HTML

 

As a side note, if you have 3 people with a particular role associated to a project, that role will be listed 3 times in the output. There is no way I have ever found to de-duplicate that info. 

 

One common point of confusion is that the 'Project Users' will sometimes contain people who have long-since left the project and are no longer assigned to anything. That is accurate info based on standard Workfront functionality. The 'User' data is a complete historical record, even when business logic would consider it 'wrong'. The only way to fix that information is to use Fusion in a really complicated cleanup scenario. 

 

View solution in original post

2 Replies

Avatar

Administrator

@Madalyn_Destafney @Lawson02 @SuryaLakhani @AmyReilly @Kurt_Jones @Srinija_N @Richard_Le_ @ChrisStephens 
@RowvillBh1 @KatherineLa @KierstenKollins @IvanBebek-iX @MorganHatcher Tagging you here as I think your expertise could really help with this question. Thanks for taking a look!



 




 

 



Kautuk Sahni

Avatar

Correct answer by
Community Advisor

Base code - This will get you every role associated to every /task/ on the project, inactive or otherwise. That is not the same as every role associated to the /people/ assigned to things on the project. 

 

displayname=Nested Roles
listdelimiter=<p>
listmethod=nested(roles).lists
type=iterate
valueexpression={name}
valuefield=name
valueformat=HTML

 

This code will get you every role associated to every person assigned to something on the project:

displayname=Nested Roles
listdelimiter=<p>
listmethod=nested(projectUserRoles).lists
type=iterate
valueexpression={role}.{name}
valuefield=name
valueformat=HTML

If you want to see that with the user's name as well, this will do that. 

displayname=Project Users
listdelimiter=<br>
listmethod=nested(projectUsers).lists
type=iterate
usewidths=true
valueexpression=CONCAT({user}.{name}," - ",{user}.{role}.{name})
valueformat=HTML
width=200

 

To drop inactive records, this is a sample based on the first list, but would work the same on the rest too.

displayname=Nested Roles
listdelimiter=<p>
listmethod=nested(roles).lists
type=iterate
valueexpression=IF({isActive},{name},"")
valuefield=name
valueformat=HTML

 

As a side note, if you have 3 people with a particular role associated to a project, that role will be listed 3 times in the output. There is no way I have ever found to de-duplicate that info. 

 

One common point of confusion is that the 'Project Users' will sometimes contain people who have long-since left the project and are no longer assigned to anything. That is accurate info based on standard Workfront functionality. The 'User' data is a complete historical record, even when business logic would consider it 'wrong'. The only way to fix that information is to use Fusion in a really complicated cleanup scenario.