Lists in Service Manager are those drop-down lists which you see on forms. For example, the Incident Category list which you'll see when you open an Incident. It's pretty easy to go and edit existing lists from the Service Manager console, from the Library section – this allows you to add to, or alter those lists which come out-of-the-box.
When you want to go ahead and create your own list, things get a little tricky. The Service Manager Authoring tool allow you to create a list, but you'll only ever to be able use it on stuff in that Management Pack.
For example, I open up the Authoring Tool and extend the Incident Class with a new List called "Locations". This will allow me to have a drop-down list of the incident form which has the locations of my offices.
This works well, but if I wanted to have the same functionality on my SR, CR, PR forms, then I'm faced with two options:
- Create and maintain 4 separate location lists. (Incident Location, Service Request Location, etc.). This is obviously an overhead I don't want to have.
- Create a single Management Pack which has all of the SR, CR, PR and IR customizations in. Yes it will work, but it would be a real pain to maintain later.
What we want to be able to do is create a list called "Locations" and re-use that single list across all my Management Packs. I'd only have to maintain that single list, and I could use it everywhere. This is where the SCSMListMaker utility comes in. Up until now, this has only been possible by writing the raw XML yourself. This tool aims to make that task a little easier!
The tool will generate the XML MP to define a custom list. This should run on any Windows machine with .net 4.
Step 1 – Download SCSM List Maker
Attached to this blog is a zip file, which contains the tool. Download & extract this.
Step 2- Build your List
Open up the Service Manager List Maker Tool. First off, click the "…" button to select where your output .xml file will be saved to.
Next, in the "List Internal Name" type in the name of your list. This has to contain only letters, numbers or full-stops (don't worry, it will stop you if it's wrong!).
To keep your list name unique, it's a good idea to name it ManagementPackName.ListName. In this example, I've called it MyLocationsMP.LocationList
As you type it in, it will populate the "List Display Name". This is the friendly-name of the list, which you'll see in the console from the Library area. Here, I've renamed mine to "My Locations":
Next up, click the "Add List" button. You'll see that the internal name is placed in the left list, and the display name on the right. You can add as many lists as you'd like to this MP, for example "My Locations" and "My Custom Status List".
Finally, you can edit the Version Number. Leave this as 220.127.116.11, unless you're replacing an old version of this MP. Once you're ready to go, click the "Make Management Pack!" button:
Step 3 – Seal it up!
Now, this has created your unsealed Management Pack (.xml) which contains your new list. As we want this list to be referenced from other Management Packs, we need to seal it. There are several ways to do this, but most of my customers like to use the friendly Service Manager Authoring Tool. There's PowerShell or command line alternatives out there if you prefer.
Install the Service Manager Authoring Tools if you haven't already done so, and open it up. The 2012 SP1 version is downloadable from http://www.microsoft.com/en-in/download/details.aspx?id=36214.
In the Authoring Tool, open up the Management Pack you created with the Service Manager List Maker. Right click the MP > Seal Management Pack. Follow the wizard to seal the MP with your key.
Step 4 – Import & populate your list
All you have to do now is open up the Service Manager console > Administration > Management Packs > Import Management Pack. Import your MP. Remember to import the sealed (.mp) file, not the unsealed (.xml) file!
Once imported, you'll be able to see your list from Library > Lists. At the moment, it's just an empty list, we'll have to populate it with data now. To do this, go to Library > Lists > Find your list & click Properties.
When you click 'Add Item' the first time, it will ask you where you want to store you values. This is because our list is stored in a Sealed MP which can't be changed. This will now create an unsealed MP to store the values of the list in. Here, I followed the wizard to create a new unsealed MP called "My Locations Value MP". This means if I want to move the MP, or back it up, the sealed MP will contain the list definition, and the unsealed one will have the values.
I just finish the list by adding more items to the list:
Step 5 – Author with it!
So your list is imported into Service Manager and working a treat. At this point, you may want to use the list to add it into the Incident class, or a Configuration Item. To do this, we'll have to copy your sealed Management Pack to the Authoring Tool Library.
Find where your Service Manager Authoring Tool is installed to, by default it's at: C:\Program Files (x86)\Microsoft System Center 2012\Service Manager Authoring\Library. Copy your sealed MP into this folder.
Now, open up the Authoring Tool & Create a new MP. In this example, I'll extend the Incident Class with my location list, and add it to the form.
In the class browser part of the Authoring tool, find the Incident Class. Right Click > View:
Now, right click the Incident Class & select "Extend Class". A warning will pop up, saying you can't edit a sealed MP. Click OK, to save the customisation in your MP.
Next, click the "Create Property" button. Give it a name, like "LocationList" and click Create. In the "Details" window of the LocationList, change this from Data Type string, to List.
In the pop-up window, you can now select your list! Click OK. At this point, the Incident class is extended with your list. It will match up with whatever contents you've added in.
Finally, you'll probably want to extend the incident form. There's examples of how to do this in the Authoring tool at http://blogs.technet.com/b/robdavies/archive/2012/08/28/displaying-incidents-by-location-option-2.aspx.
Please use the comments to report any bugs, and I'll take a look!