I'm building a user report that shows the alignment of users to their respective groups and job roles. I am displaying their primary job roles, but for some teams, they have many job roles. I'm trying to create a column that displays all job roles a user is aligned to.
Here's the code to list out all groups associated to a user... tried to use this and replicate for Job Roles, but couldn't get there. Thanks!
displayname=All Groups Assigned
link.linkproperty.0.valuefield=ID
link.linkproperty.0.valueformat=int
link.lookup=link.view
link.value=val(objCode)
listdelimiter=
listmethod=nested(userGroups).lists
namekey=group.plural
textmode=true
type=iterate
valuefield=group:name
valueformat=HTML
width=250
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi Natalie!
This should get you what you're looking for:
displayname=Role(s)
listdelimiter=
listmethod=nested(userRoles).lists
textmode=true
type=iterate
valuefield=role:name
valueformat=HTML
If you want to have the roles in the column separated by line breaks/carriage returns, add <br> to your listdelimiter (ex: listdelimiter=<br>).
-----------------------------------
If you want to get really technical, you swap out valuefield for a valueexpression. This would only return the "Other" roles (and not the primary role). Could be helpful if you want to have a column for the primary role and then a separate column that shows any other role(s) that a user may have:
displayname=Other Role(s)
listdelimiter=
listmethod=nested(userRoles).lists
textmode=true
type=iterate
valueexpression=IF({user}.{role}={role}.{name},"",{role}.{name})
valueformat=HTML
Hi Natalie!
This should get you what you're looking for:
displayname=Role(s)
listdelimiter=
listmethod=nested(userRoles).lists
textmode=true
type=iterate
valuefield=role:name
valueformat=HTML
If you want to have the roles in the column separated by line breaks/carriage returns, add <br> to your listdelimiter (ex: listdelimiter=<br>).
-----------------------------------
If you want to get really technical, you swap out valuefield for a valueexpression. This would only return the "Other" roles (and not the primary role). Could be helpful if you want to have a column for the primary role and then a separate column that shows any other role(s) that a user may have:
displayname=Other Role(s)
listdelimiter=
listmethod=nested(userRoles).lists
textmode=true
type=iterate
valueexpression=IF({user}.{role}={role}.{name},"",{role}.{name})
valueformat=HTML
Thanks Chloe!
Views
Replies
Total Likes
Views
Like
Replies