How to increase the font size in gs.addInfoMessage()

Sai Akhil
Tera Contributor

Hello all,

Is there a way to make  the font size bigger and  stay on screen longer in the addInfoMessage(), please let me know how to achieve this.

Thanks in advance,

Akhil.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Sai Akhil 

Example

BR:

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	
	var message = '<font size="7">My Message</font>';
	gs.addInfoMessage(message);

})(current, previous);

Output:

find_real_file.png

Regards
Ankur

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

View solution in original post

5 REPLIES 5

Muralidharan BS
Mega Sage
Mega Sage

Hi Sai,

There is a property to modify the font size, 

css.outputmsg.info.text.font-size

For error - css.outputmsg.error.text.font-size

 

Thanks

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use html tags to add in the info message and apply font size and style

Regards
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Sai Akhil 

Example

BR:

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	
	var message = '<font size="7">My Message</font>';
	gs.addInfoMessage(message);

})(current, previous);

Output:

find_real_file.png

Regards
Ankur

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

@Sai Akhil 

Remember if you modify the system properties then it would be global change on all the tables.

If you require this only for specific tables then you will have to go with the HTML option within the addInfoMessage

Regards
Ankur

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