Data links · Style rules

Style rules: colour shapes and markers by data

Write a facility's style rules once — conditions, fill colour, opacity, label, priority — and let data links and rack cells repaint by status. First match wins.

7 min readUpdated

What a style rule is

A style rule says "when a record looks like this, paint it like that": a name, one or more conditions, the colours to use, and a priority. Rules belong to one facility. You write them once in the editor's side panel; each data link then ticks the rules it wants, and rack-cell rules also colour the facility's rack cells from their own data.

An example set for a facility with rooms and a rack: four rules colour rooms for a Room status data link from a rooms table's `status` field, and two colour rack cells from each bin's `custom.status`:

RulePriorityConditionPaint
Room availablep10`status` = AvailableGreen #22c55e, 50 %
Room in usep10`status` = In useAmber #f59e0b, 55 %
Room cleaningp10`status` = CleaningPurple #a855f7, 55 %
Room out of servicep10`status` = Out of serviceSlate #64748b, 60 %
Bin emptyp10`custom.status` = emptyRed #dc2626, 85 %, label "EMPTY"
Bin on holdp20`custom.status` = blocked or `custom.status` = reservedSlate #64748b, 70 %

Priority: lowest number first, first match wins

For each record, a layer tries its ticked rules from the lowest priority number up (p5, then p10, then p20 …; ties go to the older rule). The first rule whose conditions match paints the record, and the rest are skipped. A record that matches nothing keeps the layer's default style. Switched-off rules are skipped.

A rule only overrides what it sets. If it sets a fill colour but no label, the label still comes from the layer's label field.

Find the Style rules panel

  1. 1
    Open the facility in the editor

    On the Facilities page, open the facility's menu → Edit layout.

  2. 2
    Clear the selection

    Press Esc or click empty map, so the side panel shows Workspace with the Layers list.

  3. 3
    Scroll to Style rules

    The Style rules section sits near the bottom of the panel, below the lists of shapes. It lists this facility's rules in priority order, each as "scope · prio N · N cond".

ControlWhat it does
Add ruleCreates "New rule" (scope Rack cell, `status` equals empty, grey fill, priority 10 above the current highest) and opens it.
Power iconEnable rule / Disable rule — a disabled rule is skipped everywhere.
PencilEdit rule — opens the editor under the row.
BinDelete rule — removes it at once, from every layer that ticked it.

If the facility has none yet: "No rules yet. Add one to paint cells / shapes from your imported data."

Write a rule

Changes save as you type; Done just closes the editor.

FieldWhat to set
NameWhat people see in the data link checklist. Prefixing the facility name keeps lists readable when several facilities use similar rules.
PriorityA number; lower runs first. Leave gaps (10, 20, 30) so you can slot rules in later.
ScopeWhich kind of thing the rule is for: Any, Rack cell, Polygon, Circle, Line, Marker, Image, 3D model, Text label or Stair.
CombineAll match (AND) or Any matches (OR). Bin on hold above uses OR: blocked or reserved.
Suggest fields from data-link layer (optional)Pick one of the facility's data links to list its real fields and values in the attribute menu — "N payload fields available in the attribute picker below." It isn't saved with the rule.
Target and Data sourceWhich shapes the rule paints and where its conditions read from, for rules that colour the facility's own shapes and rack cells. Data links ignore them.
ConditionsAttribute adds attribute · operator · value. Operators: =, ≠, <, ≤, >, ≥, in, not in, contains, starts with, ends with, is empty, is set, older than, newer than. No conditions means the rule always matches.
Paint when matchedFill, Border, Opacity %, Border w., Elevation, Height and a Label template (optional) such as `{sku}` or `{capacity} units`.

Apply rules to a data link

A rule does nothing to a data link until the link ticks it. Open the link (Data flyout → Manage data links → pencil), go to Style rules and tick the rules — see Style a data link layer. Change a rule later and every layer that ticked it repaints; viewers and share links follow automatically.

More in Data links