Highlight a calendar entry

By default, ServiceNow calendar reports provide three radio buttons above the calendar that enable you to highlight tasks by priority level, approval status, and escalation level.

About this task

When you select Priority, for example, all tasks in the calendar at a priority level of 1 - Critical or 2 - High are highlighted in a different color.

The glide.ui.report.extend_calendar_choices property specifies how calendar highlighting options are determined. If the property is set to true, highlighting options are based on the current reporting table plus the base table. If the property is set to false, highlighting options are set by the styles in the Task table only.

Figure 1. Reports highlights controls

To suit your own business needs, you can add or remove highlight controls and configure any combination of levels and states to be highlighted in a wide range of possible colors. The calendar selects the highlighting controls from the table in which they are defined (incident, change, problem, and so on). If no field styles are applied in a related table, then the calendar uses any highlighting definitions from the task (base) table.

Procedure

  1. Navigate to System UI > Field Styles.
  2. To see the default highlighting controls, filter the view of the record list for the task table. Notice that there are several records for each field, representing different levels or states possible for that field, and that each state is represented by a different highlight color. You can delete records for those levels or states you are not interested in seeing, change the highlight colors, or add new controls.
    Reports highlight controls
  3. To add a new control, click New in the record list.
  4. Select the Task [task] table from the list of tables.
  5. Select the Field you want to use as a control from the list of task fields.
  6. Type the field Value to use for your highlight trigger. If you are unsure of the value to use, navigate to System Definitions > Tables and Columns and look up the data type for your field in the task table. Field values may be a boolean, an integer, or a string in the table, regardless of how the value appears in the form.
  7. Define the Style (highlight color) for this level or state. Type background-color:<color name>, where <color name> is the configured name of a ServiceNow color as defined in Reports > Color Definition. The following record creates a radio button for the Knowledge check box that highlights all entries for which a knowledge base article has been created.
    Reports highlight controls
  8. Open a calendar report, such as Change Calendar from Reports > View/Run and select the Knowledge radio button. All calendar entries for changes that have knowledge base articles are highlighted in your selected color.