What You'll Learn
Build a multi-machine production overview
Display current production run information
Detect ongoing vs completed runs with JSONata
Create status indicator panels
Use row repeat for dynamic machine sections
Completed Tutorial 4.2 (Querying the ENLYZE API)
Completed Tutorial 4.3 (Working with Variables)
Understanding of production-runs endpoint and JSONata
A production status dashboard gives operators and managers a quick overview of:
What's running – Current product on each machine
Production metrics – OEE, throughput, quantity
Run status – Ongoing or completed
Time information – When did the run start/end
This tutorial builds a dashboard showing multiple machines side-by-side.
Dashboard Design
Option A: Side-by-side columns
Option B: Stacked rows
We'll use Option A for this tutorial.
Detecting Current Production Run
The key insight: if a production run has no end time, it's still running.
JSONata for Ongoing Detection
This adds an is_ongoing boolean field to each run.
Getting Only Current Run
To get only runs that are currently ongoing:
Or to get the most recent run (whether ongoing or not):
The API returns runs sorted by start time (most recent first by default).
Building the Dashboard
Step 1: Create Variables
First, create site and machine variables (as learned in Tutorial 4.3).
Or, for a fixed multi-machine dashboard, use constant variables:
141e0927-62b3-4e76-8398-ad82d20f397f
cc0d2dcb-564b-48cd-a342-71765a536058
Set Hide to "Variable" to keep them invisible to users.
[SCREENSHOT: Constant variables configuration]
Machine Status Section
Creating a Machine Header
Use a Text panel to display the machine name:
Add panel -> Select Text visualization
[SCREENSHOT: Text panel with machine name]
Current Product Panel
Show what product is currently running:
Query:
production-runs?machine=${machine1_uuid}&start=${__from:date:iso}
$.data[0].production_order
Panel Settings:
[SCREENSHOT: Current product stat panel]
Run Status Indicator
Create a visual indicator for run status (ongoing vs completed):
Query:
production-runs?machine=${machine1_uuid}&start=${__from:date:iso}
$.data[0].end = null ? "Running" : "Completed"
Panel Settings:
Value Mappings:
[SCREENSHOT: Run status indicator]
OEE Quick Stats
Show OEE metrics for the latest production run.
Productivity Stat
production-runs?machine=${machine1_uuid}&start=${__from:date:iso}&end=${__to:date:iso}
$.data[0].productivity.score
Red < 0.6, Yellow < 0.8, Green >= 0.8
Repeat for Availability, Performance, and Quality using:
$.data[0].availability.score
$.data[0].performance.score
[SCREENSHOT: OEE stat panels row]
Production Run Details Table
Show more details about recent runs.
Query Configuration
production-runs?machine=${machine1_uuid}&start=${__from:date:iso}&end=${__to:date:iso}
JSONata for detailed run info:
Column Configuration
Field Overrides
Start field: Unit = dateTimeAsIso
OEE field: Unit = percentunit, Min = 0, Max = 1, Cell type = Gauge
[SCREENSHOT: Production runs table]
Multi-Machine Layout
Duplicating for Second Machine
Select all panels for Machine 1
Edit each panel to use ${machine2_uuid} and ${machine2_name}
Position in the second column
Using Rows for Organization
Create collapsible rows for each machine:
Set title to ${machine1_name}
Drag machine panels into the row
[SCREENSHOT: Multi-machine layout with rows]
Advanced: Row Repeat
For dashboards with many machines, use row repeat to automatically create a section for each machine.
Step 1: Create Machine Variable
Create a multi-value variable that returns all machines:
Create a row with panels for one machine
Click the row title -> Row options
Set Repeat for to machine
Set Repeat direction to Vertical
[SCREENSHOT: Row repeat configuration]
Step 3: Use Variable in Panels
In each panel's query, use ${machine} for the machine UUID:
The row (with all its panels) will repeat for each selected machine.
Joining with Product Names
As learned in Tutorial 4.2, join production-runs with products to show product names:
Query A (Production Runs):
Query B (Products):
Transformations:
Join by field: product_uuid, Mode: Outer
Organize fields: Hide product_uuid, reorder columns
Complete Dashboard Layout
Here's the recommended layout for a 2-machine dashboard:
Each column is 12 units wide (half the dashboard width).
[SCREENSHOT: Complete production status dashboard]
Auto-Refresh for Live Monitoring
For shopfloor displays, enable auto-refresh:
Select refresh interval (e.g., 30s, 1m, 5m)
Or set in dashboard settings -> General -> Auto refresh
Recommended intervals:
Shopfloor display: 30s - 1m
Practical Exercise
Build a production status dashboard with:
Two machine sections (Kiefel and Macchi)
Per machine:
Current order (stat panel)
Run status indicator (ongoing/completed)
Recent runs table with product names
You've learned to build a production status dashboard:
Use constant variables for fixed machine configurations
Detect ongoing runs with JSONata ($not($exists(end)))
Create status indicators with value mappings
Display OEE metrics from production runs
Organize multi-machine views with rows
Use row repeat for dynamic machine sections
Continue with:
OEE Dashboard – Build aggregated OEE reports with the productivity-metrics endpoint
Quick Reference
Detecting Ongoing Runs
$not($exists($.data[0].end))
Check if latest run is ongoing
$.data[0].end = null ? "Running" : "Done"
$filter($.data, function($v){ $not($exists($v.end)) })
Constant Variables
Production Status Query
Row Repeat Settings