- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2018 11:06 PM
When selecting the color from the 'select color ' field, for example if green is selected , the background color of requester field needs to be changed to green. Any thoughts please?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2018 12:09 AM
Hi Sonbol,
here you go..
i have written onLoad() catalog client script
i have tested and it's working. just change the variable name as per you have deigned.
function onLoad() {
//Type appropriate comment here, and begin script below
var check= g_form.getValue('color'); //"color" is my variable name change as per your variable name
if(check=='green')
{
$('sys_display.'+ g_form.getControl('user').id).style.backgroundColor = 'red';
}
}
Let me know if you need any further help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2018 11:11 PM
Hi,
Please try this: This is catalog client script. You can modify for task based fields.
function onLoad() {
//Set styles for the 'caller_id' variable
var myVar = $('sys_display.' + g_form.getControl('logged_in_user').id);
myVar.style.width = '350px';
myVar.style.backgroundColor = 'LimeGreen';
myVar.style.color = 'blue';
myVar.style.fontStyle = 'italic';
//Set styles for the 'impact' variable
var myVar2 = g_form.getControl('department');
myVar2.style.width = '200px';
myVar2.style.backgroundColor = 'yellow';
myVar2.style.color = 'purple';
myVar2.style.fontWeight = 'bold';
}
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks,
Aman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2018 11:14 PM
Special mention to the following line in my catalog client script, used for reference field.
var myVar = $('sys_display.' + g_form.getControl('logged_in_user').id);
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks,
Aman

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2018 12:09 AM
Hi Sonbol,
here you go..
i have written onLoad() catalog client script
i have tested and it's working. just change the variable name as per you have deigned.
function onLoad() {
//Type appropriate comment here, and begin script below
var check= g_form.getValue('color'); //"color" is my variable name change as per your variable name
if(check=='green')
{
$('sys_display.'+ g_form.getControl('user').id).style.backgroundColor = 'red';
}
}
Let me know if you need any further help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2018 03:43 PM