On This Page

Expression Editor

Expression Editor

The Expression Editor is ProcessMind’s built-in tool for writing expressions. It opens wherever expressions are used — dataset attributes, dataset filters, and metric definitions — and always works the same way: write, validate, and preview before you save.

Expression Editor in ProcessMind

Where You Can Open It

Opened from What you are editing
Dataset → AttributesMapping / Expression cell a calculated attribute
Dataset → GeneralGlobal Dataset FilterAdd filter expression… a row filter applied before mining
Chart settings → Metric expressionUse metric expression… a metric expression evaluated per row
Chart settings → Secondary metricsExpression… a secondary metric expression
Chart settings → Text / Html chip chart text: literal text and HTML with ${ ... } expressions
Chart settings → Norm settings → ƒ → Start / Stop expression a norm boundary resolved from Process Settings constants

The dialog title reflects what you are editing, for example Edit Expression: {attribute name} or Row Filter Expression.

Writing an Expression

  • The input highlights syntax as you type: functions, attributes, constants, case properties, and row references each get their own color, and parse errors are underlined in red.
  • Press Ctrl/Cmd+Space to open completions (they do not open automatically). Enter or Tab applies the selected item, Esc closes the list.
  • Hover over any token for documentation: functions show their signature, description, and an example; attributes show their type.
  • Inside a function call, signature help shows the parameter you are filling in.
  • Undo and Redo buttons sit in the header, with Ctrl/Cmd+Z, Shift+Ctrl/Cmd+Z, and Ctrl/Cmd+Y as shortcuts.

The Reference Panel

The Select elements to build your expression panel lists everything you can use, grouped into sections:

  • Attributes — your dataset’s attributes. Click one to insert it.
  • Constants — process-wide constants defined in Process Settings.
  • Functions — grouped by category, each with a tooltip showing its signature, description, and example. Clicking inserts the function name with parentheses.
  • Case Properties and Row References — click a row reference to insert previous. and start building a comparison with the previous row.

The search box finds names, signatures, descriptions, and examples, and it understands intent: typing “days between” or “sum with condition” surfaces the matching functions. The help icon in the header opens the expression language documentation.

Preview

For attributes and metrics, the editor shows a live Top values by occurrence preview that updates as you type: the most frequent results with their counts, plus null and other buckets (up to 20 values). While the preview runs you see Running expression preview…; errors show Fix the expression to see a preview. Row filters do not support preview — the editor says so instead.

Chart Text Templates

Chart text (Text charts, KPIs, gauges, and HTML frames) is a template: literal text stays as written, and every ${ ... } segment is evaluated. The editor validates each segment and highlights it as you write. Text, Html, metric expressions, and norm expressions all apply only when you close the editor with Save; Cancel discards the draft. Plain chart text and HTML cannot be evaluated per row, so the editor shows Preview is not available for chart text instead of the value preview.

Norm expressions are resolved against Process Settings constants (for example slaTargetDays * 86400000), so the editor offers constants and functions but no dataset attributes there.

Validation and Saving

Validation runs continuously while you edit. The status line at the bottom of the dialog shows either a green Expression is valid check or a red error such as Error at position 12: Expected ‘)’ but got …. Typical errors include unknown functions or variables, wrong argument counts, unclosed strings, and type mismatches.

Save stays disabled while the expression is invalid or row-filter restrictions apply; clearing the field and saving removes the expression. Press Ctrl/Cmd+Enter to save from the keyboard, or Cancel to close without saving.

Expressions can reference other calculated attributes. To inspect one while editing, Ctrl/Cmd+click the attribute reference in your expression — it opens in its own read-only tab. The tab bar appears as soon as a second tab exists, and the preview follows the tab you are viewing.

Row Filters: Allowed and Blocked

A row filter runs on every raw event row when the data is loaded, before mining. Only rows where the expression is true are kept; false, empty, and null results are removed. That context limits what you can use:

  • Allowed: the row’s own values — the dataset’s attributes plus the built-in column aliases (caseid, time, activity, cost, user, start_time, and co2).
  • Blocked: anything that needs case-level or cross-row context — case properties, case aggregates and window functions, row references (previous.), activity lookups such as first(), and followedBy expressions.

If you use a blocked element, Save is disabled with the message: “Row filters can only use raw row data. Remove case properties, case aggregates, row references, activity lookups, or followed-by expressions.”