FAQ: Why Can’t I Add Some Columns That I Want to Views?

FAQ: Why Can’t I Add Some Columns That I Want to Views?

  • Comments 4
  • Likes

People sometimes ask why they can’t include some columns in the views that they want.  Here is a common one:  Why can’t I add the affected configuration item(s) as a column in my incident view?

In order to understand the answer to this question we must understand the incident data model.  An “incident” record is really comprised of the following things:

  • The incident object itself including all of its properties
  • Title
  • Description
  • Urgency
  • Impact
  • etc.
  • Relationships to other objects over relationship types with max cardinality = 1 (meaning there can only be at most one related object)
  • Assigned To User
  • Primary Owner
  • Affected User
  • Relationships to other objects over relationship types with max cardinality > 1 (meaning there can be more than one related object)
  • Affected configuration items
  • Affected services
  • Knowledge articles

See this blog post for more information on using type projections in views.

If you want to display properties of the incident object itself, that is pretty straightforward.  The columns would simply just display the values of the properties.  For example:

ID

Title

IR12345 Printer is broken
IR12346 HRWeb is down

It’s also pretty straightforward to add columns for related objects where the relationship type max cardinality is 1.  For example, let’s say we wanted to show the Affected User’s domain and user name.

ID

Title

Affected User Domain Affected User Username
IR12345 Printer is broken redmond twright
IR12346 HRWeb is down redmond billg

We run into some problems when we want to display properties of objects where the relationship type max cardinality is more than 1 though.  For example, let’s say we wanted to display the affected configuration items’ display names. If there was only one related configuration item we could simply just display it like this

ID

Title

Affected User Domain Affected User Username Affected CI Display Name
IR12345 Printer is broken redmond twright twright-laptop
IR12346 HRWeb is down redmond billg hrweb01

But what do we do when there is more than one affected configuration item?

We could do something like this:

ID

Title

Affected User Domain Affected User Username Affected CI Display Name
IR12345 Printer is broken redmond twright twright-laptop; printserver01
IR12346 HRWeb is down redmond billg hrweb01; hrweb02; hrweb03

But that is kind of hard to read.  It’s also technically challenging given the way the grid data binding works.  This also makes it kind of hard to sort or group by the affected CI Display name column.  And it would slow down performance.

We could do something like this:

ID

Title

Affected User Domain Affected User Username Affected CI Display Name
IR12345 Printer is broken redmond twright
twright-laptop
printserver01
IR12346 HRWeb is down redmond billg
hrweb01
hrweb02
hrweb03

This approach is also hard to read and doesn’t use space efficiently on the grid and would get really unusable when there were potentially tens or hundreds of related items.

So, at least for now, you can only use properties of objects that are related by relationship types with max cardinality = 1 as columns in views.  That is why you see the Affected User, Assigned To User, etc. relationships in the view creation dialog and not Affected CI.

image

A few other notes on this… You can see above that the Primary Owner relationship is not included in the list even though it is a max cardinality = 1 relationship type.  That’s because this view is targeted at a type projection which only includes those two relationship types.  If I wanted to include the Primary Owner column in a view I would need to target the view at a type projection which includes that relationship type.  For example if I target the view at the ‘Incident (advanced)’ type projection (Warning!!) then I will see lots of other relationship types available to me (but they are still all only max cardinality = 1 relationship types!):

image

Max Cardinality > 1 relationship types can still be used in the criteria part of the view definition though – as long as the relationship type is included in the type projection.  For example:

image

Notice how max cardinality > 1 relationship types like ‘Is Related to Configuration Item’ and ‘About Configuration Item’ are included here so you can use them as criteria for the view.

So – how do you know if a relationship type is max cardinality = 1 or > 1?  The easiest way is just to look at the fields on the form that are used for those relationships.  For example – assigned to user, affected user, primary owner, etc. all use the user picker which only allows for the selection of a single user:

image

So – this is a max cardinality = 1 relationship type.

Other relationship types use a list view control like this:

image

Since you can have more than one item here this is a max cardinality > 1 relationship type.

Since an action log can have multiple entries in it this is also a max cardinality > 1 relationship type:

image

Hope that helps make it more clear why you can’t add some of the columns you might want.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • <p>I think I understand this, but theres two factors that keep popping up from my user group.</p> <p>1. The &quot;affected User Display Name&quot; and &quot;Assigned to user Display Name&quot; that you mention above, both show as &quot;Display Name&quot;. Is the cardinality somehow preventing these names from being identified uniquely?</p> <p>2. There are some views that are completely locked (as far as I know anyway) such as the &quot;advanced find&quot; view which I&#39;ve had quite a few requests to have far more columns available. Is there a way of expanding some basic control of the views that are displayed, even better if it can be controlled by the person doing the search without them being an admin?</p>

  • <p>1. <a rel="nofollow" target="_new" href="http://blogs.technet.com/b/servicemanager/archive/2010/07/21/showing-the-correct-display-name-for-related-objects-in-view-columns.aspx">blogs.technet.com/.../showing-the-correct-display-name-for-related-objects-in-view-columns.aspx</a></p> <p>2. No, sorry</p>

  • <p>I would like to add a display column for the Affected User-User Name for a service request view. &nbsp;This is for Service Manager 2012. &nbsp;I don&#39;t see that column available to display. &nbsp;Is there a way to do this? &nbsp;Thanks.</p>

  • <p>Hi, </p> <p>it looks like the data model for service manager needs a revision, i cannot see how it make sense - not being able to display &quot;primary owner&quot; in these views. We also want to include whether the item has attachments (without open the incident, and check the &quot;related items&quot; tab). </p> <p>Thanks for any useful information.</p>