CA Service Management

Expand all | Collapse all

Configuration Item - ComboBox values

  • 1.  Configuration Item - ComboBox values

    Posted 09-13-2017 05:31 AM

    Hi there,

     

    I have a question:

    On SDM when we do Search -> Incidents, we have several fields, one of them is Configuration Item. It´s a combo box.

    When we start write something into this combo, several requests are  executed. The result of these requests are JSON, which goes to the combo box, Configuration Item combo box.

     

    I was searching, and I found on root CA SDM folder \bopcfg\www\wwwroot\scripts a file called detail_form.js, which contains several functions and there we have a function called "detailAutofill". I think this one puts the JSON received from the requests to the combo box.

     

    What I need, is to show not only the CI´s names but show the classes of the CI's name on combo. Something like "CI name - class name of this CI" on the combo. And I'm a bit lost around here...

     

    Can you help me guys to achieve this?

     

    Thanks and regards,

    Fernando



  • 2.  Re: Configuration Item - ComboBox values

    Posted 09-13-2017 06:57 AM

    Hi Fernando,

     

    If I understand your requirement right, I see that you are trying to add a concatenate value of both "CI Name + Class Name". I confirm its clear customization that you are on the hunt.

     

    The objects in Service Desk will not always run on the name, but in the background it will refer to the referred foreign key(ID/ CODE etc). So based on the value the lookup functionality tries to match as many values as it can.

     

    The CI filed can capture only the value if CI Object and not that of CLASS object in this case, as the underlying field will be the corresponding unique ID's and not the Names directly.

     

    This has to be a Text filed for you to achieve this requirement i.e some login to fetch the relevant class of the CI in focus and concatenate both the names(text values) and show this on the detail page.



  • 3.  Re: Configuration Item - ComboBox values

    Posted 09-13-2017 08:28 AM

    Hi Maheshwar_Kusuma,

     

    Thanks for reply.

     

    What you say it's a very good way to do what I need.

    But I was thinking here, when I write something into the combo box, there is a request to the server and load the data returned to the combo. The data that returns from the request it's JSON format, something like this:

     

    [

       {"label":"SelectOne","id":"00001","value":"SelectOne"},

       {"label":"SelectTwo","id":"00002","value":"SelectTwo"},

       {"label":"SelectThree","id":"00003","value":"SelectThree"}

    ]

     

    If I can't do it directly on the server, because some spell are building this JSON, there is some problem if I concatenate directly on the JSON I received? If I change the values on JSON, before they going to combo box, should I have problems with this?

     

    Fernando



  • 4.  Re: Configuration Item - ComboBox values

    Posted 09-14-2017 11:51 AM

    Hi Fernando,

     

    I haven't got much knowledge in regards to the internal bindings of this JSON and the spell code if involved, but there is not harm in implementing your idea of manipulating the JSON values. If it works that would be a brilliantt idea.