Change color of particular choice value in CSM/FSM Workspace
						
					
					
				
			
		
	
			
	
	
	
	
	
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 01:26 AM - edited 03-06-2024 01:35 AM
Hello Folks,
Anyone knows that how to set the color to specific choice value? in CSM/FSM Workspace
As you can see below when the form loads i want to set the red color to Sub Category value.(Check the highlighted text in below image).
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 01:35 AM
==========================CLIENT SCRIPTS============================
Table - Name of table
Type - OnChange of Category Field
Scripts - 
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (newValue === '') {
        control.style = 'background-color:';
        return;
    }
    switch (newValue) {
        case "inquiry":  //replace choice value
            control.style = 'background-color: green';
            break;
        case "software"://replace choice value
            control.style = 'background-color: orange';
            break;
        case "hardware"://replace choice value
            control.style = 'background-color: yellow';
            break;
        case "database"://replace choice value
            control.style = 'background-color: brown';
            break;
        case "network"://replace choice value
            control.style = 'background-color: red';
            break;
    }
    //Type appropriate comment here, and begin script below
}Please mark reply as Helpful/Correct, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 01:45 AM - edited 03-06-2024 01:46 AM
tried but didn't worked
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 04:03 AM
please replace your code line 9
control.style = 'background-color: red';
Please mark reply as Helpful/Correct, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 04:08 AM
Hi, @Service_RNow
I want to set the text color not background color, that's why i have written that code over there.
control.style = 'color: red';
