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 03:03 AM
hi @Manikantahere ,
try this
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()) {
var question = Packages.com.glideapp.questionset.Question.getQuestion(varown.sc_item_option.item_option_new);
var label = question.getLabel();
var displayValue = question.getDisplayValue();
// Skip if label or value is empty / invalid
if (!label || !displayValue || displayValue == '-- None --' || displayValue == 'false' || question.order <= -1) {
continue;
}
// Skip specific labels
if (label.startsWith("Person this request is for") || label.startsWith("Incident Details")) {
continue;
}
// Append to the result
wn += '\n<strong>' + label + ':</strong> ' + displayValue;
}
gs.log(wn);
current.u_item_details = wn;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 03:19 AM
getting like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 03:29 AM
Seems you missed the 1st response to your question which I shared.
If your field is String -> Then it won't work
Convert that field to HTML and then add the logic
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-21-2025 02:10 AM
Hope you are doing good.
Did my reply answer your question?
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 03:37 AM
It looks like you're currently using a String type field, which doesn't support rendering HTML formatting. To make the bold tags (<strong>) work as expected, you'll need to change the field type to HTML.
Once you've updated the field type, run your script again and the labels should render in bold correctly. Let us know how it goes after making these changes and testing it further!