How to set RITM details Labels as Bold?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 02:22 AM - edited 07-02-2025 02:36 AM
The details are populating before insert business rule.
Can we make only labels from left side bold and populate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 02:25 AM
As you're copying or moving this value into the field, and if you want to make the label bold, it would require a good amount of customization. I don’t think making it bold adds significant value, but it does create a technical debt.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 02:35 AM
If Item Details field is of type String then it won't support HTML tags etc as it's a platform limitation.
You can try to use HTML Field and add content there and then you can manipulate and make only Label as bold
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 02:40 AM
hi @Manikantahere ,
Instead of building a plain text string, build an HTML string and wrap each label in <strong> tags.
Like this
var details = '';
details += '<strong>Request Type:</strong> ' + current.request_type + '<br>';
details += '<strong>Name:</strong> ' + current.name + '<br>';
details += '<strong>Position:</strong> ' + current.position + '<br>';
// ... and so on
current.u_item_details = details; // or whatever field you use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 02:58 AM
copyVars();
function copyVars() {
var wn = '';
var varown = new GlideRecord('sc_item_option_mtom');
varown.addQuery('request_item', current.sys_id);
varown.orderBy('sc_item_option.order');
varown.query();
while (varown.next()){
// gs.log('found a SC item variable to copy into the Request Item');
var question = Packages.com.glideapp.questionset.Question.getQuestion(varown.sc_item_option.item_option_new);
question.setValue(varown.sc_item_option.value);
if (question.getLabel() != '' && question.getDisplayValue() != '' && question.getDisplayValue() != '-- None --' && question.getDisplayValue() != 'false' && question.order > -1){
if(question.getLabel().indexOf("Person this request is for") == 0 || question.getLabel().indexOf("Incident Details") == 0) {
ignore = true;
}
else {
wn += '\n<strong>' + question.getLabel()+ ':</strong>' + question.getDisplayValue();
}
}
}
gs.log(wn);
current.u_item_details=wn;
}
can you modify this script ?