CA Service Management

Expand all | Collapse all

Is there a way (method) to access Service Option Name from inside a form's JavaScript in Service Catalog ?

  • 1.  Is there a way (method) to access Service Option Name from inside a form's JavaScript in Service Catalog ?

    Posted Jul 07, 2017 08:56 AM

    We are using Service Catalog 14.1.0.279.

    I am working on a new requirement where there is a need to access service option name in order to decide Approvers for the form. Any input will be helpful.

    Thank you.



  • 2.  Re: Is there a way (method) to access Service Option Name from inside a form's JavaScript in Service Catalog ?

    Posted Jul 24, 2017 09:36 AM

    We were not able to do this in Service Catalog alone, so we added field on the form which we populated with the subscription detail id in PAM.  We then created a number of queries which could run at form load time to extract information such as the service option name.



  • 3.  Re: Is there a way (method) to access Service Option Name from inside a form's JavaScript in Service Catalog ?

    Posted Jul 24, 2017 10:14 AM

    It looks like you are using a base install of 14.1. After 14.1 CP1 (14.1.01) you can leverage the JavaScript expression '_.soe.item_text' in your JavaScript function. Following is an excerpt of the documentation from here:

    Addition of New objectSOE to Form Designer Standard Objects Set

    This object has been added as there was a requirement to access the Service Option ID to which the form has been attached to. The new object is soe which is available exclusive to Form designer object set. This object has three properties:

    • soe.item_id: Specifies the Rate item id of the service option name field
    • soe.item_text: Specifies the Service option name
    • soe.service_option_id: Specifies the service_option_id of this service option

    These new properties could be used to build some useful regular expresssions. For example, to show a form field if the Form is attached to a Service option whose name is New Hire Onboarding:

    Hidden = $(_.soe.item_text!=’ New Hire Onboarding’)

     

    I would recommend applying CP4 (14.1.04 - RO96941) which is the current published maintenance and includes CP1/CP2.

     

    You can also take a look at the following similar thread for some additional information:

     

    How to export the selected service options to SDM?