using ref qualifier on Catalog Items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2024 07:24 AM - edited ‎12-16-2024 07:25 AM
I am mimicking the same function on the incident form where I have a software field, and it gets the value of the CI field and calls a script include that returns the software related to the CI , im doing the same on the portal but seems like the function is not working , is there a particular way of doing this in the Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2024 09:35 AM
If the name of the Catalog Item variable for Configuration item is 'cmdb_ci' then use 'current.variables.cmdb_ci' in your reference qualifier Script Include function call argument to pass the value to the Script Include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 02:37 AM - edited ‎12-17-2024 04:13 AM
Hello @ServNowDev
Update the reference qualifier script as follows:
javascript:new myscriptInclude().getSoftwareCI(current.variables.cmdb_ci);
- "myscriptInclude()" is the script include name
- "getSoftwareCI" is the function in the Script Include that retrieves the relevant information
- current.variables.cmdb_ci passes the Sys ID of the cmdb_ci variable from the current record to the Script Include
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar