Example: Showing Fields in Different Colors Based on Value
2 min
this topic describes how to colorize an incident record based on the value in the impact field create the styles to use on your form see using highlighter styles docid\ ealzqhhx4c 6sp xmvrf in this example, we created a list style that shows a yellow background you could create a style for each impact value (low, medium, high) example new list color apply the style to a field in your form see creating a form docid\ jylkxqcbbnayk66grc2ty for information on how to use fields in this example, we opened the incident servicedesk form, and applied the style to the impact field using an expression in the style rule parameter edit expression to include color style $(if( impact == "low"), "lowimpactcolor", if( impact == "medium"), "medimpactcolor", if( "incidentslathirdescalation"), "impactcolor"))) click save to close the window open the incident workspace from the service desk console and observe the background color of the impact field colors based on the impact value note that in the style rule property you can use the same values as in the style property you should specify the underlying values (not the display values) when using them in expressions default styles can be used in style rules the reverse is not true; it is not possible to use styles for the style property, or in control style expressions
