First published on TECHNET on Oct 01, 2009
Here is a simple example that demonstrates how you can add a column to an existing view.
Specifically, we will be adding a “Source” column to the All Open Unassigned Incidents view that is shipped out of the box. “Source” property enables you to see the Incident source (e.g. email, portal, console, SCOM or DCM).
The high level steps are as follows, further details about each step are provided below:
Step 1: Export the Incident Management Configuration management pack
Step 2: Edit the management pack xml and add the column
1. Add the “source” column to Column definitions for the View
2. Add the “source” string to the Viewstrings for the View
3. Add the “source” string to the StringResources Section
4. Add the “source” display strings to the LanguagePacks section for English
Step 3: Save the management pack and Import it in Service Manager
Step 1: Export the management pack that contains the view definition
Note you can only export the unsealed management packs.
In this case the view is defined in Incident Management Configuration pack.
- Go to Administration->Management Packs
- Filter for Incident management config
- In the task pane Click Export
- Save the management pack
Step 2: Edit the Management Pack to add the “Source” column
Open the saved management pack in your favorite XML editor or Notepad :-)
- Navigate to the Presentations section and find the view “System.WorkItem.Incident.Active.Unassigned.View”
- Insert the xml fragments in two places as shown below:
- In “Columns” section
<Presentations>
<Views>
<View ID="System.WorkItem.Incident.Active.Unassigned.View" Accessibility="Public" Enabled="true" Target="CoreIncident!System.WorkItem.Incident" TypeID="SMConsole!GridViewType" Visible="true">
<Category>NotUsed</Category>
<Presentation>
<Columns>
<mux:ColumnCollection xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mux=
http://schemas.microsoft.com/SystemCenter/Common/UI/Views/GridView
xmlns:s="clr-namespace:System;assembly=mscorlib">
…….
<mux:Column Name="Source" DisplayMemberBinding="{Binding Path=Source}" Width="150" DisplayName="Header_Source" Property="Source" DataType="s:String" />
</mux:ColumnCollection>
</Columns>
- In “ViewStrings” section
<ViewStrings>
......
<ViewString ID="Header_Source">$MPElement[Name="System.WorkItem.Incident.Active.Unassigned.View.Header_Source"]$</ViewString>
</ViewStrings>
- Navigate in the same XML file to <StringResources> and insert the bolded line as shown below:
<StringResources>
.......
<StringResource ID="System.WorkItem.Incident.Active.Unassigned.View.Header_Source" />
</StringResources>
- The final edit is for the respective language pack section. Below is the example for the English
- Navigate to “LanguagePacks” and insert the bolded text below within the DisplayStrings
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
.....
<DisplayString ElementID="System.WorkItem.Incident.Active.Unassigned.View.Header_Source">
<Name>Source</Name>
<Description>Source</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
Step 3: Save the management pack and Import it in Service Manager
· Save the management pack – Do not change the name of the MP
· Open the Service Manager Console
· Navigate to Administrations -> Management Packs
· In the Task Pane click Import
· Add the saved management pack and click Import
Navigate to the Work Items -> Incident -> All Open Unassigned Incidents. You should see the “Source” column now displayed in the view.
You can also refer to this post for authoring more complex capabilities through management pack
Updated Mar 11, 2019
Version 4.0System-Center-Team
Microsoft
Joined February 15, 2019
System Center Blog
Follow this blog board to get notified when there's new activity