CA Service Management

 View Only
  • 1.  CA Catalog - LookUp field form - How to select multiple values?

    Posted Jul 07, 2016 02:06 PM

    Hi all,

    In CA Service Catalog, how do I select multiple values rather than just selecting one?

    At the bottom I've pasted the lookup field definition from the CA help site.

    It gives no information of how a user can, for example, search a config item and select multiple rows.

    eg:

    1. The user types in server%.
    2. Results show 2 radio buttons: server_c_drive and server_d_drive
    3. The user selects both values

     

    I'm new to Java script and don't know where to start.

     

    Lookup Field

    Works with the JavaScript function ca_fdDoFieldLookup(fieldId, reportId) to populate fields based on user input to a report data object.
    You configure the lookup field to prompt the user to enter the data for the query of the data object. Example:user ID, asset ID, or city. The data object queries the data source, which is based on the user input. The results are used to populate the fields you specify.
    The user clicks the search icon for the lookup field and enters the requested data. The query runs and returns the search results in rows. Each matching value appears in a row. Users review the rows and select one. When the user selects a row, the results from that row populate the matching fields on the form.
    For example, the lookup field can prompt the user to enter a user ID. The query then searches the database for the first name and last name of the user ID. The user can select one row to populate the corresponding First Name and Last Name fields on the form.



  • 2.  Re: CA Catalog - LookUp field form - How to select multiple values?
    Best Answer

    Posted Jul 07, 2016 02:36 PM

    Hi jwood, my approach would be :

     

    Use a "text field" and a "Select".

     

    Set the "Select" to allow multiple selection.

     

    On your "Select" control, set the report object ID, and in the Report variable attributes, pass it the value of your text field. something like : $({'variableInReportObject':ca_fdGetTextFieldValue(ca_fd.formId,'yourTextField')})

     

    Create a function in your form who does :

    ca_fdFetchSelectData(ca_fd.formId,'yourSelect');

     

    And call it on the onChange or onBlur event of your "text field".

     

     

    Disclaimer :

    Provided code was typed directly on the forum and was not tested, may contains typo.

    I expect you to understand that i'll not teach you how to code, there's plenty of JS course on the internet.

     

     

    Regards,

     

    Pier



  • 3.  Re: CA Catalog - LookUp field form - How to select multiple values?

    Posted Jul 07, 2016 03:26 PM

    Please teach me JAVA!!

    Thanks for the reply, I now need to head to google and soldier on. Thanks for pointing me in the right direction with your quick reply.