* Describe the bug
Formula fields inside a one-to-many relation (Purchase Bill Lines) displayed as Sub-table Inline Edit always return 0.
The same formulas work correctly:
- In a normal form
- In popup edit mode for the subtable row
So the issue appears only in inline editing mode of subtable.
* Environment
- NocoBase version:** v2.0.25
- Database type and version:** PostgreSQL 16
- OS:** Windows
- Deployment Methods:** Docker
- Docker image version:**
nocobase/nocobase:latest-full - NodeJS version:** N/A (Docker)
* How To Reproduce
-
Create a collection (e.g. Purchase Bill Lines)
-
Add fields:
- Quantity (number)
- UnitCost (number)
- Tax (number)
-
Add formula fields:
- Subtotal = Quantity * UnitCost
- TaxAmount = Quantity * UnitCost * (Tax / 100)
- Total = Quantity * UnitCost * (1 + Tax / 100)
-
Create another collection (Purchase Bills)
-
Add one-to-many relation to lines
-
Display lines as Sub-table (Inline Edit) inside the form
-
Add a new record and enter values
Result:
- Formula fields stay 0
Additional check:
- Change subtable to popup edit → formulas work correctly
- Use normal form → formulas work correctly
Expected behavior
Formula fields should calculate correctly in Sub-table Inline Edit, same as in normal forms and popup edit mode.
Screenshots
(attach your screenshots showing inline = 0 and popup = correct)
Logs
No errors in logs.