- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 01:15 PM
Hello,
I'm creating a catalog item request so that new items get added to our Product Catalog. I want to include the Manufacturer (Brand) and Model Number (Manufacturer Reference) in the description field of the Hardware Model record, but it's not populating as required. The issues is that there's no line break and the Brand (Manufacturer) populates the Sys ID instead of the actual manufacturer name. Any input would be much appreciated 🙂
Current Display:
What it should actually look like:
Part of my Run Script (code highlighted in bold):
//Create new hw product model
var gr = new GlideRecord('cmdb_hardware_product_model');
gr.initialize();
gr.manufacturer = current.variables.manufacturer; //Populates Manufacturer, Vendor fields
gr.model_number = current.variables.model_number; //Populates Model number, Product ID fields
gr.cost = current.variables.price; //Populates Cost, Price fields
gr.name = current.variables.description+'('+current.variables.model_number+')'; //Populates Display Name field
gr.asset_tracking_strategy = current.variables.asset_tracking_strategy; //Populates Asset Tracking Strategy fields
gr.cmdb_model_category = current.variables.model_category; //Populates Model Categories field
gr.comments = current.variables.additional_product_details; //Populates Comments field
gr.description += "Brand: " + current.variables.manufacturer; //Populates Manufacturer in Description field
gr.description += "\nManufacturer Reference: " + current.variables.model_number; //Populates Model Number in Description field
var model_sysid = gr.insert();
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 01:22 PM
Did you try with break tags
gr.description += "Brand: " + current.variables.manufacturer; //Populates Manufacturer in Description field
gr.description += "<br/>Manufacturer Reference: " + current.variables.model_number; //Populates Model Number in Description field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 01:22 PM
Did you try with break tags
gr.description += "Brand: " + current.variables.manufacturer; //Populates Manufacturer in Description field
gr.description += "<br/>Manufacturer Reference: " + current.variables.model_number; //Populates Model Number in Description field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 01:40 PM
That worked perfectly...thank you so much!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 01:43 PM
You bet!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 01:29 PM
For your issue with the sys id displaying, change 'current.variables.manufacturer' to 'current.variables.manufacturer.getDisplayValue()'