Showing the Correct Display Name for Related Objects in View Columns
Published Feb 15 2019 03:38 AM 1,451 Views
First published on TECHNET on Jul 21, 2010

When you create a new view in the Service Manager console, if you choose to base the view on a Combination Class (aka Type Projection), then you can choose to show properties of related objects in the column.  For example, in an incident view you might want to show the display name or user alias for the person that the incident is assigned to or who the related affected user is.

Unfortunately, when you do this today in the Service Manager console:

You end up with a column header that shows the property display name which in this case is ‘Display Name’.  That’s not very useful and can be downright confusing when you try to show two properties of related two different related objects such as the assigned to user and the affected user like this:

Which column is which???

Fortunately, this is fairly easy to fix by editing some XML in the management pack.  It’s a little tedious but at least it can be done.  In this blog post I’ll show you how.

First, you need to find the MP that your view is stored in the Administration/Management Packs view.  In case you don’t know exactly which MP here are some hints: Look at just the unsealed MPs – they are the only ones that will contain views.  Then look for ‘incident’ if it is an incident view, etc.

Once you find your MP, click Export in the task pane to export it out as an XML file and open it in some XML editor (notepad if you have to).

Each view has a definition that looks like this:

Notice how each column is defined and for each column the DisplayName for the column header label is bound to a ViewString by having the same identifier:

The MPElement notation there then points to a StringResource later in the XML document:

And for each StringResource in each LanguagePack there is a DisplayString:

See how each display string right now is ‘Display Name’?  That’s what we need to fix by changing it to something more meaningful like ‘Affected User’ and ‘Assigned User’:

Keep in mind that if you have multiple language packs in your MP you will need to do this for each LanguagePack.

Now, save the MP .xml file and import the MP into SCSM – ignore the warning about losing data.  Close and reopen the console and you will see the new column header names:

That’s better!

As long as you created your views using the Service Manager console here is a hint : to do this quickly, just grab the unique number (e.g. 4c75e….) and do a find for that in the MP XML to quickly skip to the right DisplayString element in the management pack.  You don’t really need to worry about the ViewString, StringResource mapping elements in between.

Note: If you modify the view in any way these modifications will be reverted by the console so make sure you have the view just the way you want it before you make these changes.  If you need to make some changes you just need need to make the manual modifications again.  If you know you are going to do this ahead of time you could copy the DisplayStrings section in the XML and then just bulk replace that in the XML instead of surgically doing it one at a time.

Update: April 4 2011:  Kan Mongwa wrote a handy tool for manipulating column display names:

Version history
Last update:
‎Mar 11 2019 08:31 AM
Updated by: