Recipes
Each is a complete script for one slot. Keys are from the example forms; substitute your own.
Total a column across a repeatable section
Value script, or use the formula ROWSUM({checks.hours}) on a Calculated
field.
SUM(rows('checks').map(r => r.hours))Count only the rows that were actually filled in
COUNT(rows('defects').map(r => r.defect_ref))Show a field only when something was chosen
Condition script.
!isBlank(value('hazards'))Show a field only for one option
value('equipment_type') === 'excavator'Compare against the option’s value, not its label.
Stamp who logged the record, and when
Value script on a read-only text field.
`${user().name} — ${TODAY()}`Read the asset ID from inside a subform entry
Value script on a field of the child form.
parent('asset_id')Require a second field once a threshold is passed
Validation script on the second field.
value('hours_run') <= 500 || !isBlank(value('permit_number'))
? true
: 'A permit number is required past 500 hours.'Refuse a date in the future
value('inspected_on') <= TODAY()
? true
: 'The inspection date cannot be in the future.'Default a date to today, but let it be changed
Value script on a date field that is not read-only.
TODAY()Warn when every check in a section failed
Validation script on the section, or on a summary field.
rows('checks').every(r => r.check_result === 'fail')
? 'Every check failed. Confirm the machine is out of service before submitting.'
: true