Regarding making variable part in bold

rutujalande
Tera Contributor

Hello,

 

I have a requirement to make part of question field of checkbox type Project Number not found / Multiple Project Numbers / Not Applicable / Unknown (enter manual note), only  (enter manual note) this part in bold on portal/catalog form. kindly suggest on this any inputs.

 

 

Thanks.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@rutujalande 

I think you created this as duplicate question

This is not feasible

Why not keep a Rich Text Label variable just above your variable and add the formatting?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@rutujalande 

I think you created this as duplicate question

This is not feasible

Why not keep a Rich Text Label variable just above your variable and add the formatting?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

pr8172510
Kilo Sage

Hi @rutujalande,

I tested this requirement

Catalog Client Script

function onLoad() {



    setTimeout(function() {

        var lbl = document.getElementById(
            "ni.IO:ce7bb7a89306031021f9fe818bba1061_label"
        );

        if (lbl) {

            lbl.innerHTML =
                'Project Number not found / Multiple Project Numbers / Not Applicable / Unknown <b>(enter manual note)</b>';

        } else {

            alert("Label not found");

        }

    }, 50);

}

 

  • Classic Catalog UI Works as expected and only "(enter manual note)" is displayed in bold.
  • In Service Portal Does not work.

    pr8172510_1-1783668430765.pngpr8172510_2-1783668444189.png

     

 

hi @pr8172510 ,

 

Does this mean that the catalog client script will not work for catalog form on service portal. and "(enter manual note)" will not be displayed in bold letters. Any alternative for this ?

@rutujalande 

the above solution which works in native uses DOM manipulation which is not recommended.

Customer won't agree to this

DOM manipulation is sometimes not supported in portal

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