- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2020 01:25 PM
Hi All,
I created a variable with label type and wrote a catalog client script to make it bold and color. It is not working on portal, I get error "there is a javascript error in your browser console" on portal
function onLoad() {
var text = $j("label[for='IO:f37690b2db1d53c0fee9f7d41d96195a']"); // f37690b2db1d53c0fee9f7d41d96195a is the sys_id of label: vac_details
text.css('font-weight', 'bold');
text.css('font-size', '125%');
}
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2020 01:39 PM
Hi,
What you can do is create a widget with HTML (https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/build/service-portal/task/create...) that has the text you want for the label and you can make it bold, etc. and then add that to your catalog item as a "macro" variable (https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-manage...).
Example:
This is where you'd associate that new widget you made to your macro variable.
<div>
<b>This is a bold label!</b>
</div>
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2020 01:39 PM
Hi,
What you can do is create a widget with HTML (https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/build/service-portal/task/create...) that has the text you want for the label and you can make it bold, etc. and then add that to your catalog item as a "macro" variable (https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-manage...).
Example:
This is where you'd associate that new widget you made to your macro variable.
<div>
<b>This is a bold label!</b>
</div>
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!