How to change variable background color
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2022 01:32 AM
I am using service portal to request adding business application record. After I request, it will send the record to approver and the record include variables in service catalog.
I would like to change the background of these variables if the value in variables match some condition.
I tried to use catalog client script such us [g_form.getControl('submitted').style.backgroundColor = 'blue';] script, but it does not work as expected.
How can I achieve these requirement?
Please advice, Thanks
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2022 01:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2022 04:06 AM - edited ‎10-05-2022 04:07 AM
You could do this using an onLoad Client script.
I've written the below now so havn't checked it in an instance, but think it should work. In the below when submitted is yes the background will go blue. Make sure you are declaring the actual field name, and not its label
(New community forum seems to be having some problems so it wont let me post a reply that actual contains the code)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2022 05:26 AM
Thanks for comment. Can you provide some sample code in text? It will be very helpful for me

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2022 05:37 AM - edited ‎10-05-2022 05:37 AM