CA Service Management

 View Only

 CA Service Catalog: Filtering Data Object Results using a Select Combo-Box

Jump to Best Answer
Scott Stineman's profile image
Scott Stineman posted Apr 21, 2024 02:54 PM

Hello: I am building a form for staff to request software to be installed onto their laptops.  I have two select combo-boxes on the form: "Software Type" and "Software to Install".  "Software Type" uses a data object which does a lookup to ca_resource_class where the "name" begins with "Application SW.".  "Software to Install" uses another data object which does a lookup to ca_owned _resource.  I plan to use a variable to limit the results to a specific resource_class.

Here is the part I am unsure of how to accomplish.  When the "Software Type" is updated, I would like to dynamically update "Software to Install" based on which resource_class was selected.  In other words, if the customer chooses "Application SW.Other" from the "Software Type" select combo-box, I would like the "Software to Install" select combo-box to refresh and only display items that have resource_class "Application SW.Other".

Could someone provide guidance?  Thank you.  Scott

Satya Kiran Jasti's profile image
Broadcom Employee Satya Kiran Jasti Best Answer

Hi Scott,

We can use the ca_fdFetchSelectData for this purpose as below.

Select 1 -> onChange -> ca_fdFetchSelectData(ca_fd.formId,'sel_2')

Select 2 -> report plugin variable -> $({'INTEGER':ca_fdGetSelectedOptionValues(ca_fd.formId,'sel_1')[0]})

where 'INTEGER' is the report plugin dynamic variable (Integer type) in the ca_owned_resource query.

Second select field will be filtered with only values from ca_owned_resource which have resource_class as selected from first select field.

Regards,

Satya Kiran