Expand my Community achievements bar.

Join us for our Coffee Break Sweepstakes on July 16th! Come ask your questions or share your use cases on Creative Briefs for a chance to win a piece of Workfront swag!
SOLVED

Assigning tasks based on "Other Role" ?

Avatar

Level 4

Hello everyone,

 

One of our scenarios is updating task assignments depending on the user role. Everything is working fine if it's a Primary Role, but if the user has needed role as Other Role, the scenario does not see it. It sees only the Primary Role.

For example, the user has Primary Role as Manager - 75% and Other Role as Programmer - 25%, and I need to assign task to the Programmer, but the scenario does not see this other role. How can I get the Other Role value to be able to use it and assign the task?

Any thoughts or workarounds?

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 6

I was able to tweak the custom API call in my test scenario to at least output the related jobs roles.  I'm still a Fusion newbie, so I'll defer to the more experienced here for how to iterate through the different roles in order to assign the tasks properly.

Fusion job roles API call.pngFusion job roles API output.png

 

 

View solution in original post

6 Replies

Avatar

Level 6

Well, I'm stumped.

userRoles are a collection under Users.  I have a user report that shows user roles, indicating percentages and what role is the primary (I'm guessing the text mode came from some a source somewhere here in the forum):

 

description="Primary" indicates the user's primary job role
displayname=Job Roles (%)
listdelimiter=<p>
listmethod=nested(userRoles).lists
textmode=true
type=iterate
valueexpression=CONCAT(IF({user}.{roleID}={role}.{ID},CONCAT("[Primary] ",{role}.{name}),{role}.{name})," (",{timePercentage},")")
valueformat=HTML

 

In Fusion I can get the userRole IDs for a given user.  However I can't seem to then get the roles (roleID or role name) for them.

Hopefully someone can figure out that piece.

Avatar

Level 4

Thank you for sharing.

Yes, that's the problem, that when I try to pull user role, there is only primary role in output, not the other

Avatar

Level 6

In reporting I can display the user's primary role, all user roles, and the related job roles for those user roles:

user roles report.png

I can get Fusion to output the multiple user roles, but I'm stuck at connecting those user roles to their related job roles:

Fusion job roles.png

 

 

Avatar

Level 4

I get this too, I just can't use it the way I need

Avatar

Correct answer by
Level 6

I was able to tweak the custom API call in my test scenario to at least output the related jobs roles.  I'm still a Fusion newbie, so I'll defer to the more experienced here for how to iterate through the different roles in order to assign the tasks properly.

Fusion job roles API call.pngFusion job roles API output.png

 

 

Avatar

Level 4

@KristenS_WF That's awesome! You've got it!

 

I was able to replicate it and then extract it into variables that I can use in my scenario!

Screenshot 2024-05-09 114019.png

Screenshot 2024-05-09 113902.png

Thank you so much for your help!!