Expand my Community achievements bar.

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

Text Mode snippet for resolving HomeTeamID column to Home Team > Team Name in Report View

Avatar

Level 6

Hello -

Could someone please guide me in converting a column that currently looks up Owner: Home Team ID so that the value it displays the name of the home team rather than the ID?

Owner Home Team ID is a natural field for Views but not the name of that Home team.

I've tried searching the Advanced Reporting documentation and references in the API Explorer and am not sure there is a relationship that can be established, but tbh I'm still wrapping my head around how to work in Text mode.

Naively, I tried (unsuccessfully):

valuefield=owner:homeTeamID:team:name

querysort=owner:homeTeamID

valueformat=HTML

displayname=Home Team Name

linkedname=owner

namekey=view.relatedcolumn

namekeyargkey.0=owner

namekeyargkey.1=homeTeamID

Is it possible to display the Home team name values in the column as desired?

Thanks,

M.

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Mylah,

The below text mode code should do it:

displayname= Home Team Name

linkedname=owner

namekey=view.relatedcolumn

namekeyargkey.0=owner

namekeyargkey.1=homeTeam

namekeyargkey.2=name

querysort=owner:homeTeam:name

textmode=true

valuefield=owner:homeTeam:name

valueformat=HTML

Best Regards,

Rich.

View solution in original post

11 Replies

Avatar

Correct answer by
Community Advisor

Hi Mylah,

The below text mode code should do it:

displayname= Home Team Name

linkedname=owner

namekey=view.relatedcolumn

namekeyargkey.0=owner

namekeyargkey.1=homeTeam

namekeyargkey.2=name

querysort=owner:homeTeam:name

textmode=true

valuefield=owner:homeTeam:name

valueformat=HTML

Best Regards,

Rich.

Avatar

Level 2

Can this also be done to convert a Portfolio ID to a Portfolio Name?

Avatar

Level 2

displayname=Portfolio
linkedname=project
namekey=view.relatedcolumn
namekeyargkey.0=project
namekeyargkey.1=portfolioName
namekeyargkey.2=name
querysort=project:portfolioID
textmode=true
valuefield=project:portfolioID:name
valueformat=HTML

Avatar

Employee

@Richard Leek‚ - wow! That might win for fastest answer of the week! That was amazing!

Avatar

Level 2

Hello - I am trying to do this as well using the answer above but it is not returning any values. I want to display the 'Name' that is tied to the Home Team ID. When I do that though the value returned is null. ANY help is appreciated.

displayname= Home Team Name

linkedname=owner

namekey=view.relatedcolumn

namekeyargkey.0=owner

namekeyargkey.1=homeTeam

namekeyargkey.2=name

querysort=owner:homeTeam:name

textmode=true

valuefield=owner:homeTeam:name

valueformat=HTML

Avatar

Level 4

Hi Sandy!

The codes can differ depending on the type of report you're using. I've cleaned up the code to only 4 lines in all of these examples.

In the task report, we have to specify that we're jumping a level to see the project owner (tasks don't have owners - only primary assignees). The task report code would be:

displayname=Home Team Name

textmode=true

valuefield=project:owner:homeTeam:name

valueformat=HTML

--------------

The project report code would be:

displayname=Home Team Name

textmode=true

valuefield=owner:homeTeam:name

valueformat=HTML

--------------

To add a third possibility into here - if you're using a task report and actually want to grab the task's primary assignee's home team, this would be the code:

displayname=Home Team Name

textmode=true

valuefield=assignedTo:homeTeam:name

valueformat=HTML

--------------

If you're not seeing results with these codes, it's also possible that the user doesn't have a Home Team ID.

Avatar

Level 2

How do I heart this!!! Your last example was exactly what I needed. Thank you😊 so much!

Avatar

Employee

Hey Sandy -

Chiming in here - if you find a solution that helps you - "Select it as best" and then Chloe will get a few extra points on the leaderboard AND others will know what solved your problem the best! (You'll get some points for selecting it too!)

So glad you found what you needed.

Kyna

Avatar

Level 2

My question was a follow up - there is already a 'Best' Selected. I do not see an option to do so.

Avatar

Employee

AH. My bad. Sorry, Sandy. But now you know for future questions that you post. :) Huge props to Chloe for sharing all her knowledge!