using ref qualifier on Catalog Items

ServNowDev
Tera Guru

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 

 

ServNowDev_0-1734362646998.png

 

2 REPLIES 2

Brad Bowman
Kilo Patron
Kilo Patron

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.

Juhi Poddar
Kilo Patron

Hello @ServNowDev 

Update the reference qualifier script as follows:

JuhiPoddar_0-1734437545711.png

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