add_formula
Add or update calculation formulas in ELN templates by binding variables to form fields and using built-in functions to compute results and write them to specified paths.
Instructions
添加或更新计算公式。ELN 内置 22 个函数。详细语法见 Skill: expression-engine.md
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | 已有公式 ID(更新时传入) | |
| title | Yes | 公式显示名称 | |
| variables | Yes | 变量列表 | |
| expression | Yes | ELN 表达式 | |
| writeFormValue | Yes | 结果写入字段路径 |