Browse Guides
5 guides
3 guides
2 guides
13 guides
1 guide
9 guides
12 guides
2 guides
18 guides
1 guide
1 guide
1 guide
2 guides
1 guide
1 guide
1 guide
1 guide
1 guide
1 guide
1 guide
2 guides
2 guides
1 guide
Expressions and Validation
Use expressions, formulas, and validation rules to calculate values, enforce quality checks, and guide more advanced data-source behavior.
Use expressions and validation when the data source needs to do more than simple data entry.
This is an advanced setup area. It is useful when you want to:
- calculate one field from other values
- normalize or transform incoming values
- reject invalid readings
- reference values from connected data sources
When to use expressions
Use expressions when a value should be derived instead of entered directly.
Common examples:
- calculate totals from several numeric fields
- convert a raw number into another unit or scale
- populate a field based on another field
- reuse values from connected data sources
Prepare the data source first
Before you write expressions:
- Create the main fields you need.
- Add any connected data sources under More settings if the logic depends on other sources.
- Save the data source so the schema is stable.
This makes expressions easier to test and maintain.
Add expression-based logic
- Open the data-source editor.
- Add or open the field you want to calculate.
- Enter the expression or formula in the field configuration.
- Save the data source.
If the expression changes existing reading behavior, Zira can ask whether previous readings should be recalculated.
Use validation rules
Use validation when a reading should be accepted only if it meets a rule.
Common validation checks include:
- minimum value
- maximum value
- minimum length
- maximum length
- required values
- allowed values
Use these rules when you want to prevent low-quality readings from entering the workflow.
Write expressions carefully
Keep expressions easier to maintain by following a few rules:
- start with simple formulas before building larger ones
- use clear field structure and labels so the logic is easier to follow later
- add connected data sources only when they are really needed
- review recalculation prompts carefully on active data sources
If a formula becomes difficult to read, split the logic across more than one field instead of forcing everything into a single expression.
What to expect after saving
After you save:
- derived values can be calculated as readings move through normalization
- validation rules can reject or fail readings that do not match the configured limits
- existing readings may be recalculated if you confirm that step during save
Get help from AI Assistance
AI Assistance can help you think through:
- which fields to add first
- how to structure a calculated field
- what validation rules fit a use case
- how to break a complex formula into smaller steps
When you ask, describe:
- the fields you already have
- the value you want to calculate
- any ranges or limits you need to enforce
Read next
- Fields and Structure - Organize fields before adding expressions.
- Advanced Settings - Connect other data sources and save safely.