write_formulas only when the user wants a persistent model change.
Workflow
- Resolve the target and referenced properties.
- Identify the scenario.
- Determine formula scope from explicit context or a table block.
- Read formulas at the exact condition to determine create versus update.
- Validate the expression and condition.
- Write the formula.
- Review applied and rejected results.
- Verify calculated values when the change is material.
Create versus update
Calllist_formulas with the final condition.
- If a matching formula exists, pass its
formula_idto update it. - If none exists, omit
formula_idto create a new formula.
Batch behavior
write_formulas accepts several formula items.
partialis the default. Valid items are applied and invalid items are rejected.atomicrejects the entire batch when any item is invalid.
Required fields
Each item requires:property_idconditionexpression
formula_break_id only for a Date-scoped Formula-period formula.