Freigeben über


Working with Lists in Service Manager

In Service Manager, we can easily configure Lists from the console. This allows you to ensure all the drop-down lists across forms contain the right values for your organization.

For example, the 'Incident Classification' list can be altered to include 'Facilities Problems' or 'Mobile Device Problems'.

I've had a few questions recently, asking where the customizations to your lists are stored. This blog will explain how to find that out.

 

#1 – Where is the List defined?

Let's look at the Incident Lists as an example.  From the Lists, we can see which Management Pack these are stored in:

We can see that this is a Sealed Management Pack:

 

If you export the Incident Management Library (System.WorkItem.Incident.Library.xml) file, this is what you'll see:

        <EnumerationValue ID="IncidentTierQueuesEnum" Accessibility="Public" />

        <EnumerationValue ID="IncidentClassificationEnum" Accessibility="Public" />

        <EnumerationValue ID="IncidentResolutionCategoryEnum" Accessibility="Public" />

This MP defines that there are some lists, such as the Incident Classification. HOWEVER there is no contents of the list in this Management Pack.  Basically, this MP has created some lists, but not populated them with anything.

 

#2 – Where is the List contents?

In this case, we know that out of the box, the Incident Classification list does contain some items.  So where are they? There are a few ways to do this (look through the MP XML, PowerShell), but I'm using SQL here

The query below can be run against the ServiceManager database. All you need to do is replace Incident Classification with the display name of the List from the Service Manager console. For example, you could replace with Service Request Support Group.

 

select EnumTypeName, lt.LTValue, mp.MPName, mp.MPFriendlyName

from enumtype et

JOIN LocalizedText lt on

lt.ElementName = et.EnumTypeName

JOIN ManagementPack mp on

mp.ManagementPackId = et.ManagementPackId

where lt.LanguageCode =
'ENU'

and lt.LTStringType = 1

and et.ParentEnumTypeId =
(

select et.EnumTypeId from LocalizedText lt

JOIN EnumType et on

(et.EnumTypeName = lt.elementname)

WHERE lt.LTValue =
'Incident Classification'

AND lt.LTStringType = 1

AND lt.LanguageCode =
'ENU')

and et.Enabled = 1

order
by et.Ordinal

 

In the output we can see all of the items in the list, their display name and the Name of the MP they are stored in:

Note – the ones with the EnumTypeName which are Enum.{GUID} are items generated via the Service Manager console.  The others are out-of-the-box.

Here, we can see that the list Items are stored in the Service Manager Incident Management Configuration Library (ServiceManager.IncidentManagement.Configuration.xml) MP. Of course, as we're updating this in the console, the MP is unsealed:

#3 – Why are they in that MP?

You may notice, when you edit the Incident Classification List, it just works. I.e. It doesn't ask you where you want to store you custom list items.

The reason is:

  • The List is defined in the SEALED MP we identified in step 1
  • Out-of-the-box, that list has got items added to it.  They have already been stored in UNSEALED MP from step 2.
  • Therefore, all future additions to the list will go in the same MP as step 2.  You've no control over that from the UI.

 

You may notice that sometimes when you edit a list, you get a pop-up, asking which MP to store the list contents in:

 

This happens for 1 of 2 reasons:

  • The List was defined in a sealed MP & hasn't been extended yet.  Therefore you have to select the unsealed MP to use.  This is a one-time thing, then all items will go in the same unsealed MP.
  • The list may already have items in it, but they are inside of a sealed MP.  Therefore, your extensions will need to be in an unsealed MP.  Again, this is a one-time selection.