Unanswered Service Manager Custom Views

  • Wednesday, June 13, 2012 8:43 PM
     
     

    Is it possible to set a views criteria to contains instead of equals a selected list item?

    for instance...

    If i have a list of 800 locations for our company and our tech support users are forced to select a location for each incident opened but do not know which region a location belongs to. I would like to be able to concatonate the region and location names together such as 0001-Branch2-SouthWest and use an operator for a view like this

    [Incident.Location][contains][SouthWest]

    So that any tickets that have been created for branches in the south west region will show in my particular view. 

    It sounds easy to just add yet another list picker and have the helpdesk users select what region, but being that they don't know this information off the top of their head and the information does not change there is no reason why they should have to figure this out. Additionally my Field service techs should not have to see all the tickets for all regions if they are only concerned with theirs.

    I appreciate any help and hope this makes sense.

    Thanks!!!

    Ryan

All Replies

  • Wednesday, June 13, 2012 9:04 PM
     
     

    Off the top of my head, there are two tools you might be able to use to help with this.

    When defining criteria (inside the MP..this can't be done through the console), you can use the "In" criteria. Example:

    <Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
      <Expression>
        <In>
          <Property>$Context/Property[Type='System.WorkItem.Incident']/Classification$</Property>
          <Values>
            <Value>9C46171F-64A2-B33A-FBD3-D3ED9881CDF6</Value>
            <Value>3D5430DC-EA64-C457-70D8-11D8257E0B58</Value>
            <Value>3C272B6C-A330-9135-E836-4E787EDE8C7C</Value>
            <Value>6185BF42-FBBA-4339-9AA9-DA0FDE48D881</Value>
            <Value>E1ECB59B-A9F0-9ED4-B675-B4C1C8CE97FD</Value>
            <Value>BCA04F7A-41E6-B053-6E40-EF4B02FDCCFD</Value>
          </Values>
        </In>
      </Expression>
    </Criteria>

    (Yes, folks, I took that right from the SCPlatform blog :) ) Basically, this is saying "If the incident's classification property matches _any_ of these enumerations, return it". So, with that technique, you could populate your criteria with all your Southwest enumerations. This doesn't help much if you're constantly adding new locations though. So, on to the second tool:

    The other tool is "Under". If you organize your enumerations into a parent/child configuration (for example, you'd have a parent "SouthWest" enumeration with various child locations under neath that), then you can use Under to match all children of "SouthWest". This is great if your list changes frequently. The downside, though: if your list isn't already organized in a parent/child configuration, it might be a nuisance to reorganize it.

    The blog post is here:

    http://blogs.msdn.com/b/scplat/archive/2010/10/24/use-under-operator-for-enum-query.aspx

    There's also a "Like" operator, but I don't know if it would work with enumerations the way you want..I've personally never tried it.

    See if one of those tools will work for you..if not, we'll explore some custom solutions