enumerations not showing up properly in form

Mehwish_ShahidMehwish_Shahid Customer IT Monkey ✭

Hello,

we have a Config Item Class called „FFM.Class.Buchungsdaten.js“. It has 2 properties of type „Enum“, (property names „ZugewiesenAn“ and „Status“) that I want to display as drop down menus on the custom form of the Class.

This is how their columnfield code looks like in the custom form:

columnFieldList:

[

       { DataType: "Enum", PropertyDisplayName: "Buchungsdatenstatus", PropertyName: "Status", EnumId: 'a7d36f0e-3c84-4ff3-8885-8d6e5d2888f8' },

        { DataType: "Enum", PropertyDisplayName: "Zugewiesen An", PropertyName: "ZugewiesenAn", EnumId: '42009db4-d5cf-ebfa-5418-67081d4ef538' },

]

This is where the enumerations are specified in the Management Packs:

MP: FFM.Class.BuchungsdatenCIs

<EnumerationTypes>

       <EnumerationValue ID="FFM.Enum.Buchungsdaten.ZugewiesenAn" Accessibility="Public" />

       <EnumerationValue ID="FFM.Enum.Buchungsdaten.Status" Accessibility="Public" />

       <EnumerationValue ID="FFM.Enum.Buchungsdaten.Status.Active" Accessibility="Public" Parent="FFM.Enum.Buchungsdaten.Status" Ordinal="0" />

       <EnumerationValue ID="FFM.Enum.Buchungsdaten.Status.Ready" Accessibility="Public" Parent="FFM.Enum.Buchungsdaten.Status" Ordinal="1" />

       <EnumerationValue ID="FFM.Enum.Buchungsdaten.Status.Completed" Accessibility="Public" Parent="FFM.Enum.Buchungsdaten.Status" Ordinal="2" />

</EnumerationTypes>


MP: FFM.Enum.Buchungsdaten

<EnumerationTypes>

       <EnumerationValue ID="FFM.Enum.Buchungsdaten.ZugewiesenAn.161" Accessibility="Public" Parent="BuchungsdatenCIs!FFM.Enum.Buchungsdaten.ZugewiesenAn" Ordinal="0" />

       <EnumerationValue ID="FFM.Enum.Buchungsdaten.ZugewiesenAn.162" Accessibility="Public" Parent="BuchungsdatenCIs!FFM.Enum.Buchungsdaten.ZugewiesenAn" Ordinal="1" />

</EnumerationTypes>


But when I open the form of an „FFM.Class.Buchungsdaten“ Object, the drop down menus only show one of the options (the one specified for the object when it was made). But you can’t open the dropdown menu to see the other options and change it to a different one, and I can't figure out what the problem is..

Best Answer

Answers

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    It sounds like maybe the enum hasn't synced into the portal. You might try restarting cachebuilder and recycling the app pool.

  • Mehwish_ShahidMehwish_Shahid Customer IT Monkey ✭

    @Justin_Workman We restarted the IIS and Windows Service for Cireson but it's still the same.. How can you check caching in SQL?

  • Mehwish_ShahidMehwish_Shahid Customer IT Monkey ✭

    I just saw in the dev tools, that a function GetFlatList gets called that's supposed to retrieve the enumeration children according to the API Documentation. But the result is empty

    function:

    "/api/V3/Enum/GetFlatList/?id=a7d36f0e-3c84-4ff3-8885-8d6e5d2888f8&itemFilter=&itemFilterIds=&includeParents=true"

    result in json:

    [  {

    "Id": "00000000-0000-0000-0000-000000000000",

    "Text": "",

    "Name": "",

    "HasChildren": false,

    "Ordinal": null,

    "EnumNodes": [],

    }

    Does that help you? The id is definitely the one for the enumeration we created. I also used the api to check some other enumerations we had and I get results there, so I don't know why these 2 specific enums (ZugewiesenAn and Status) don't work..

  • Shane_WhiteShane_White Cireson Support Ninja IT Monkey ✭✭✭✭

    Hi @Mehwish_Shahid

    If you run the below PowerShell does the correct enumeration list come back?

    Get-SCSMEnumeration -Id a7d36f0e-3c84-4ff3-8885-8d6e5d2888f8

    Get-SCSMEnumeration -Id 42009db4-d5cf-ebfa-5418-67081d4ef538

    Thanks,

    Shane

  • Mehwish_ShahidMehwish_Shahid Customer IT Monkey ✭

    @Shane_White

    I just checked, it gives me an error for both:


    Get-SCSMEnumeration: The Data Access service is either not running or not yet initialized. Check the event log for more information.

    In Zeile:1 Zeichen:1

    + Get-SCSMEnumeration -Id 42009db4-d5cf-ebfa-5418-67081d4ef538

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      + CategoryInfo     : InvalidOperation: (localhost:String) [Get-SCSMEnumeration], ServiceNotRunningException

      + FullyQualifiedErrorId : GenericMessage,SMLets.GetSMEnumerationCommand

  • Shane_WhiteShane_White Cireson Support Ninja IT Monkey ✭✭✭✭

    Hi @Mehwish_Shahid

    This needs to be run on any of your SCSM Management servers, or specify the -ComputerName parameter.

    Thanks,

    Shane

  • Mehwish_ShahidMehwish_Shahid Customer IT Monkey ✭

    @Shane_White Oh right, I forgot that. Now it gives me the correct enumerations "FFM.Enum.Buchungsdaten.Status" and "FFM.Enum.Buchungsdaten.ZugewiesenAn"

  • Shane_WhiteShane_White Cireson Support Ninja IT Monkey ✭✭✭✭

    Hi @Mehwish_Shahid

    Can you run the below against your Service Management DB and see if there is any results?

     Select *

     From dbo.Enumeration

     Where Enabled = 0

    Thanks,

    Shane

  • Mehwish_ShahidMehwish_Shahid Customer IT Monkey ✭

    @Shane_White

    I don't have access to the database, but my team leader sent me this screenshot last week of the child enumerations of "42009db4-d5cf-ebfa-5418-67081d4ef538" in the database. But Enabled is 1, not 0. Should it be 0?


  • Shane_WhiteShane_White Cireson Support Ninja IT Monkey ✭✭✭✭

    Hi @Mehwish_Shahid

    It should be 1, so that is all fine!

    I noticed they both have the same parent Enumeration, can you send me screenshots of how the enumerations look in SCSM?

    Thanks,

    Shane

  • Mehwish_ShahidMehwish_Shahid Customer IT Monkey ✭

    @Shane_White

    Do you mean in the Console or in SCSM Entity Explorer?

    This is how they look like in the Entity Explorer.. The "Status" one looks similar. And they have the same parent Id because we want them as options in the drop down list (161 and 162)


  • Shane_WhiteShane_White Cireson Support Ninja IT Monkey ✭✭✭✭

    Hi @Mehwish_Shahid

    Your above SQL shows the child enumerations are enabled, but can you check that the parent enumeration is enabled too please?

    Thanks,

    Shane

  • Mehwish_ShahidMehwish_Shahid Customer IT Monkey ✭

    @Shane_White We just checked and both parent enums are Enabled=1 too.

Sign In or Register to comment.