How to make catalog item variable bold and increase the font size

Feddy
Kilo Sage

We have one record producer and we would like to increase the font size of the variable and make it bold.
I came across couple of posts and we could use property 'glide.ui.escape_text to 'false' to achieve.
Is there any other option that I can follow to meet the requirement?

any help on this would be much appreciated.

17 REPLIES 17

Shubham Tipnis
Kilo Sage
Kilo Sage

Hi Feddy,

You can try this;

g_form.getControl('variable_name').setAttribute('style', 'font-weight: bold);

 

Also, try solutions provided in below links.

https://community.servicenow.com/community?id=community_question&sys_id=f2628beddb98dbc01dcaf3231f96199b

https://community.servicenow.com/community?id=community_question&sys_id=95168b61db1cdbc01dcaf3231f9619f6

 

Please mark correct/helpful if applicable.

 

Regards,

Shubham

Regards,
Shubham Tipnis
 ServiceNow Enthusiast
️ 3x Rising Star (2022–2024) – ServiceNow Community
 Sharing insights, use cases & real-world learnings from the Now Platform
 Always learning. Always building.

Ankur Bawiskar
Tera Patron
Tera Patron

@Feddy 

I have shared working solution here which works in native + portal

How to make text of Label type in Bold

Regards
Ankur

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

@Ankur Bawiskar 
As usual, your input worked for me.
I need to do it for all the variables which are present in this record producer.
So I would probably need to add all of them in the loop right.
Also, It works only for the single line text fields not for the yes/no fields.

@Feddy 

Glad to know.

Yes you will have to enhance for all the variables. Not very sure about the Yes/No.

But since it uses HTML Text to search you can hard-coded that in an array and then perform

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

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