Skip to content

Highlighting keywords ​

The values of a field — keywords, product codes, the e-mail addresses and phone numbers a text-mining step found — can be highlighted wherever they occur in the messages, and coloured by the category another field puts them in.

Setting it up ​

Under Highlights, choose the Highlight field from the app's fields. …or type a field name takes a hidden field, or any field when the list cannot be read; match and [match] both work.

The field does not have to be associated with the messages: a data island works. The rest of the Highlights settings, and the Categories section, appear once a highlight field is set.

Which values are highlighted ​

  • The values selected in the highlight field, as long as the other selections leave them possible.
  • With nothing selected there, the values the other selections leave possible — so picking a category and a conversation lights that category's values up. Highlight possible values turns that off; the bar then says Select values in HlKeyword to highlight them.
  • When every selected value is excluded by other selections, nothing is highlighted, and a banner says so: 2 values selected in HlKeyword, but excluded by other selections.
  • Most values to highlight — 1000 by default, up to 10,000 — caps the values used. When there are more, the first in the field's text order count, and the summary becomes a banner: The first 1,000 of 20,017 selected values.

How values are matched ​

Values are looked for in the text of each message — the text a markdown message shows, where a value can run across bold, italic, links and code, but never from one paragraph, list item, table cell or heading into the next. Names, times and badges are not searched.

SettingDefaultWhat it does
Match caseOffOn: "Istanbul" no longer highlights "ISTANBUL"
Whole values onlyOnA value is highlighted only where it stands on its own: letters, digits and _ carry a word on, while spaces and punctuation such as -, ., @ and ' end it. Off: a value is highlighted inside longer words too
Flexible whitespaceOnAny run of spaces, tabs and line breaks in a value matches any run in the text. Off: they must match exactly
  • Where two values overlap, the one that starts first wins, and the longer of two that start together: with both "New York" and "York City" highlighted, "New York City" marks "New York".
  • In text written without spaces between words, such as Chinese or Japanese, a value almost always has other letters beside it, so it is found only with Whole values only off.
  • Load number-like keywords with Text(). A field loaded without it keeps one spelling for 0701234567 and 701234567, and only that spelling is highlighted.

Categories and colours ​

Under Categories, the Category field groups the highlighted values:

  • A value without a category is highlighted in grey and counted under No category.
  • A value in several categories is tinted in the first of them, by name, and underlined in all of them; its tooltip names every one.
  • A category field in a data island gives every value every category.

Colour expression is evaluated for each category and returns its colour — RGB(68, 119, 170), ARGB(), HSL(), Color(3), or text such as '#4477aa', 'rgb(68, 119, 170)' or 'steelblue'. Type it as plain text; a leading = is optional. Without one, categories take the theme's colours by their place in the data model, so a category keeps its colour whatever is selected — and can share a colour with a person, since both draw from one palette.

Show legend lists the categories, by name, with how many highlights each has; hovering one says in how many messages — ops: 12 highlights in 5 messages. A category with none left after the selections stays in the legend, dimmed. With conversations side by side, the counts are for the lanes shown.

Show category labels puts each highlight in a box in its category's colour, with its category names after it, for readers who cannot rely on colour.

Stepping through the keywords ​

The keyword group in the bar above the conversation — a swatch drawn as the highlights are, a count such as 3 of 7, and ◂ ▸ — steps from one highlight to the next, separately from the find box. Alt+↓ and Alt+↑ do the same from the keyboard, and the overview ruler beside the conversation shows where the highlights are. See Searching and stepping.

Selecting from a highlight or a legend chip ​

A click on a highlight selects its value in the highlight field — every spelling it stands for, where matching ignores case — and a click on a legend chip selects its category in the category field. Ctrl+click or Cmd+click adds a value or removes it; clicking the only selected chip clears it. A highlight's tooltip says what a click will do.

These select at once, like a filter pane, rather than waiting behind Qlik Sense's confirm tick. The tick confirms the values in the object's own data, and the highlight field is not part of it. A selection pending in the object's own selection mode — lane headers being picked, say — is confirmed first.

The corner says what was selected, and where, since the highlight field is often in no other object on the sheet:

Selected “reload” in HlKeyword

— Selected “Reload” and “RELOAD” in HlKeyword when a highlight stood for two spellings, and Selected “Reload” and 2 more in HlKeyword for more. It names only the values actually selected. A Ctrl+click or Cmd+click says nothing: it adds a value or removes one, and the object cannot tell which of the two happened — a notice that guessed would be worse than none. Clearing the only selected chip says nothing either.

When a click selects nothing, the corner says why:

MessageWhy
HlKeyword is lockedThe field is locked
There is no value to select in HlKeywordThe field holds no such value
Qlik Sense did not select in HlKeyword; the field may be lockedQlik Sense refused the selection
Could not select in HlKeyword: Qlik engine error 6003The engine failed, with its own error number
Could not select in HlKeyword: the selection in progress could not be confirmedA pending selection in the object's selection mode could not be confirmed first

A highlight selects nothing while the sheet is being edited, in an image or PDF export, or with Select by clicking a highlight off, when a click on it is a click on the message. A highlight inside a link leaves the click to the link.

Enter on a message selects the value of the keyword stepped to, when it is in that message.

The summary and the banners ​

While Show highlight summary is on, the line at the top of the object counts what was found — 3 selected values · 12 highlights in 5 messages, or 1 selected value · none found in these messages.

Warnings and errors are banners above the conversation, whatever the switches say: the highlight or category field missing from the data model, an engine error, values excluded by other selections, values left out by Most values to highlight, and problems with the colour expression. Each is listed, word for word, in the Reference.

In the data model ​

  • A keyword table linked to the messages by Message ID makes the id a key field: count a field only the messages table has in the integrity probe — see The data model.
  • With a category field, at most 20,000 rows of value and category are read; the summary says when that leaves values out — The first 640 of 3,000 possible values: their categories filled 20,000 rows.

In exports ​

An image or PDF export has no highlights, no legend and no keyword group.

Released under the MIT licence.