Change Variable to Bold and Color red in Catalog and ITIL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 09:36 AM
Hi everyone,
I have a few variables I need to change the color and make bold. I've read a couple articles but am not having much luck. Below is what I've tried:
Set the sys_properties glide.ui.escape_text to 'fasle'
Then applied the following at question <font size=4 color='green'><i>Name</i></font>
Unfortunately this isn't working as expected. Any suggestions?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 09:44 AM
Hi @Gemma4,
You need to write Client scripts with Isolated scripts check box as true.
Take a look at this article: Field Styles for Service Catalog Variables
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 10:40 AM
Hi @Sagar Pagar
I did attempt the client script, see attached. Unfortunately the color is not changing and now I get the following error " ErrorThere is a JavaScript error in your browser console"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 10:43 AM - edited 07-18-2023 10:55 AM
Hi @Gemma4,
Have you set Isolated scripts check box as False.
Is it possible to share the console error here?
Also, try this scripts as well.
var getLblParent= g_form.getElement('variable_name').id.replace('sys_original.','');
var getLblElement = $j("label[for='"+getLblParent+"']").css('color','red');
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 11:34 AM
Hi @Sagar Pagar
Thank you for the suggestion but I'm still getting a java script error
Yes I did select and unselected the checkbox at Isolated scripts - no difference
I marked my original script inactive and added the new script below. - no difference.
Any other ideas?
thanks