Reference field is not showing any value based on the selection from another choice field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 04:05 PM
I have 3 fields called Server, Web Application & Web Components. The server field returns the cmdb child cis, where the web application returns the value of parent.sys_class_name when i select server. Both of these fields are working. My issue now, when i select web application choices e.g. Tomcat, Apache etc...the web components which is reference to cmdb_rel_ci doesn't display any value (it should return the cmdb parent cis from the selection of web app). I'm using script include to retrieve the parent cis by passing 2 parms which is parent classname (from web application) and childsysid (from server), and when i run using background script it listed all the parent sysid. however in my web components field, nothing showed. Below is my log. Any idea or recommendations why the parent Ci is not showing in my reference field (web components)?
I'm using ref qual and passing the parms as:
javascript: "sys_idIN" + new CLOUCatalogUtils().getServerListfromClassName(current.variables.web_application, current.variables.server);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 05:38 PM
If these are fields on a table/form, not variables in a Catalog Item, then remove the '.variables' from your reference qualifier function call - so it would just be current.web_application, current.server. Otherwise, post the Script Include using the insert code icon </>. If you haven't already done so, you can troubleshoot by adding some logs to confirm that it is running, and the 2 values passed in from the reference qualifier. If you're not seeing any of the logs, confirm there are no other Script Includes with the same name and that it is in the same scope as the Catalog Item or table/form.