Home Analyst Portal

Hiding enumeration values


A customer has a requirement that on some Service Requests (with a specific "Source" or "Area") that some enumeration values, specifically some of the status values are to be hidden. Is this at all possible?

I have envisioned a couple of scenario's to achieve this.

1. Some way to hide the values themselves.
2. Create a custom list, and a workflow to sync that value to the "Status" Property afterwards.
3. Create a custom list, and a JS Custom Task to sync set the status afterwards.

Has anyone done anything like this before?

Best Answers


  • James_AtanceJames_Atance Cireson Support Advanced IT Monkey ✭✭✭

    Have you look at the following KB?


  • Fredrik_BorchseniusFredrik_Borchsenius Customer IT Monkey ✭
    Permanently disabling an enumeration isn't a problem. I did read throught that KB, and it unfortunately doesn't solve the problem. I only need to hide an enumeration if a specific property is set to a pre-defined value. In this case, it has to trigger on the SOURCE prop.
  • Jaime_PalazuelosJaime_Palazuelos Partner IT Monkey ✭

    In case someone looks for a easy and fast script to hide the sealed enumerations:

    $SQLConnectionString ="Server=$SCSMSQLServer;Initial Catalog=ServiceManagement;Persist Security Info=False;Integrated Security=SSPI;"
    $SQLconnection = New-Object System.Data.SqlClient.SqlConnection($SQLConnectionString)   

    $ServiceRequestAreaEnums = Get-SCSMEnumeration -Name ServiceRequestAreaEnum | ? {$_.DisplayName -ne 'Service Request Area'}
    foreach($Enum in $ServiceRequestAreaEnums){
        $SQLQuery = "UPDATE Enumeration SET Enabled = 0 WHERE EnumerationID = '$($Enum.Id)'"

        $SQLCommand = New-Object System.Data.SqlClient.SqlCommand($SQLQuery,$SQLconnection)

Sign In or Register to comment.