How to set RITM details Labels as Bold?

Manikantahere
Tera Contributor

The details are populating before insert business rule.
Can we make only labels from left side bold and populate?

 

Manikantahere_0-1751447497740.png

 

9 REPLIES 9

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Manikantahere 

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]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Manikantahere 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Community Alums
Not applicable

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

 

 

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 ?