Affected CI not displaying cmdb_ci when populated from the Service Portal with a variable

CharlesGriff
Mega Sage

I have a service portal and on the service portal I have the create incident widget that references a record producer. In the record producer I have a variable for the affected ci that references to the affected ci on the incident table. I auto populate the affected ci on the service portal with the relevant cmdb_ci item affected, this I pull from the URL with a catalog client script, but when the incident is created the affected ci field does not display the name of the item. Has anyone had a similar issue before, how do I get the reference field to display the name if the item.

1 ACCEPTED SOLUTION

Dave Smith1
ServiceNow Employee
ServiceNow Employee

Are you populating it with the CI name, or the sys_id of the CI?



You may need a callback here.


View solution in original post

5 REPLIES 5

Dave Smith1
ServiceNow Employee
ServiceNow Employee

Are you populating it with the CI name, or the sys_id of the CI?



You may need a callback here.


Hi David



I am trying to populate it with the CI name. If I get the sys_id of the CI how do I display the name and not the sys_id. If I change the affected ci field on the incident table to a string it displays the name, why is it so difficult with a reference field.


This may help: https://developer.servicenow.com/app.do#!/api_doc?v=helsinki&id=r_GlideFormGetReference_String_Funct...



Have you attended our Scripting course? Callbacks are covered there, as well as explaining more deeply how reference fields work.


I will look into this.


No I have not had the opportunity to attend the scripting course maybe this year I will get the chance.



Thanks