locked
Question about List values that have parent-child relationships in SCSM2012 RRS feed

  • Question

  • I have created a list in SCSM 2012, it has 2 tiers of child items for each top level list item. (seen below)

    The problem I am facing is when I attempt to access this fields value from PowerShell, it only gives me the "last" item selected. Rather than the "full Path" that is selected(and is displayed) in the CR.

    So if I select Application Services, it shows just that. "Application Services"

    If I drill down to Application Services\General\Miscellaneous it only shows the last part, "miscellaneous"

    For some back ground, I am trying to use powershell to auto assign change reviewers as seen here: http://social.technet.microsoft.com/Forums/en-US/administration/thread/f4b98993-d70c-4216-b92c-2d9c61449d40

    But with this field behaving this way, it seems as though I need unique values for all items in the list.

    Anyone have any ideas or suggestions?


    Joshua Fuente

    Wednesday, November 28, 2012 7:21 PM

Answers

  • Hey

    If you have the enumeration object you will see the parent property. maybe you can use this.

    The id you mention is automatically generated for UI-generated List Values. You could change those to more meaningful names. or if you add the list values directly in xml, the id's have the correct values from start.

    Cheers
    Marcel


    SCSMfaq // Blog --> http://blog.scsmfaq.ch // Twitter --> #scsmfaq // Business --> http://www.itnetx.ch

    • Marked as answer by NachoScript Monday, December 10, 2012 3:21 PM
    Wednesday, November 28, 2012 8:08 PM

All replies

  • Hey

    Depending on the exact needs you could use the parent property as additional info to make sure you have the correct value. Or you can use the internal name (id) when accessing the enumerations.

    Regards
    Marcel


    SCSMfaq // Blog --> http://blog.scsmfaq.ch // Twitter --> #scsmfaq // Business --> http://www.itnetx.ch

    Wednesday, November 28, 2012 7:52 PM
  • Could you elaborate on that a bit? 

    Not sure how to access the parent property?

    For the internal name, I assume you are referring to the name value below. (enum.b9e...)

    ordinal name                                  displayname
    ------- ----                                  -----------
    0       Enum.b9e76762b26e4ab6bb9433569140454f Application Services

    I could probably use that, but how would I go about finding all the internal names for the list values? Such that I could use a hash table or csv to be able to determine the association.


    Joshua Fuente



    • Edited by NachoScript Wednesday, November 28, 2012 8:07 PM
    Wednesday, November 28, 2012 7:58 PM
  • Hey

    If you have the enumeration object you will see the parent property. maybe you can use this.

    The id you mention is automatically generated for UI-generated List Values. You could change those to more meaningful names. or if you add the list values directly in xml, the id's have the correct values from start.

    Cheers
    Marcel


    SCSMfaq // Blog --> http://blog.scsmfaq.ch // Twitter --> #scsmfaq // Business --> http://www.itnetx.ch

    • Marked as answer by NachoScript Monday, December 10, 2012 3:21 PM
    Wednesday, November 28, 2012 8:08 PM
  • I think I am just going to re-work the list so that the values are unique, seems like the simpler solution.

    Thanks for the help.


    Joshua Fuente

    Thursday, November 29, 2012 12:47 AM