Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to modify Hardware Asset "Display Name" properties??

Gerry Crumbley
Giga Expert

Asset>Portfolio>Hardware Assets

How can I modify the "Display Name". We do not need the Asset Tag number there.

find_real_file.png

6 REPLIES 6

Is this where the Model "display name" is calculated?


What do I edit to make this show the Model Number?



find_real_file.png


var values = [current.manufacturer.getDisplayValue(), current.name, current.version, current.edition];


var displayName = '';




if (values[1].toLowerCase().indexOf(values[0].toLowerCase()) != -1 && 'true'.equals(gs.getProperty('glide.cmdb_model.display_name.shorten')))


values[0] = '';




for (var i = 0; i < values.length; i++){


if (values[i] != undefined && values[i] != '')


displayName += ' ' + values[i];


}


current.display_name = displayName.trim();


Harish KM
Kilo Patron
Kilo Patron

Correct. You dont need to modify the script include. In BR just remove the first condition "current.asset_tag.changes()". This will not populate asset tag once u remove the condition


Regards
Harish