Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

Anybody know the text code to list out in a single column all Job Roles assigned to a user in a User report?

Avatar

Level 2

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.name=ID

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

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Level 4

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

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