Overview
Column values display custom data in workflow tables, showing information like patient names, file names, or other key data extracted from the workflow context. They can be defined at the workflow level (all steps) or step level (overrides).
Basic Usage
Workflow-Level Columns
Define columns that appear for all steps using the Workflow constructor:
Step-Level Columns (Overrides)
Individual steps can override or add columns:
Column Value Structure
The get_display_col_values parameter is a dictionary where:
- Keys: Column names displayed in the interface
- Values: Lambda functions that receive
WorkflowRunContext and return a column value or None
None values: Display as ”—” (em dash)
Typed Column Values
Column functions can return more than strings. The return value determines the
column’s type, which affects how the value is displayed and sorted:
Return date/datetime objects (rather than pre-formatted strings) for date
columns so they sort chronologically.
If a column function raises an exception, the value is treated as missing —
the workflow run itself is not affected.
Data Sources
Start Data
Step Results
Safe Data Access
Always handle missing data gracefully:
Best Practices
- Use descriptive column names:
"Patient ID" not "ID"
- Provide fallback values: Always use
.get() with defaults
- Format data appropriately: Truncate dates, format numbers
- Keep lambdas simple: Move complex logic to separate functions
Column Inheritance
Column ordering follows a specific pattern based on the order columns are defined in the dictionary:
Ordering Rules
- Workflow-level columns appear first in the order they were defined
- Step-level columns with the same key/name override workflow-level columns but maintain their original position
- Step-level columns with different keys are appended to the end in the order they were defined
Example
This ensures consistent column ordering across all workflow steps while allowing step-specific customization.
Complete Example