Formula Field doesn’t show reference table attribute
* Environment
NocoBase version: 1.6.1
Database type and version: PostgreSQL 16.8
OS: MacOS
Deployment Methods: Create-nocobase-app
Docker image version:
NodeJS version: v18.20.6
* How To Reproduce
Create General Collection Some Reference Table that contains Some Modifier (Field Interface: Number)
Create General Collection Some Table that contains Some Number (Field Interface: Number) and Reference Table (Type: many to one, refer to Some Reference Table table)
Create new formula field to multiply Some Number with Some Modifier, the expression didn’t show Reference Table field
Expected behavior
Reference Table field shown so we can select Some Modifier
I’m having exactly the same situation where basically I want to create a formula field within one of my data source. I want the formula to basically use one association field within the data source, but it seems that Nocobase does not support currently.
I would appreciate if anyone has some info about this.
Is there any workaround for performing calculations using a field from the reference table? I attempted to duplicate the field and set its value using ‘Set Default Value’ in the form, but in some cases, we cannot display it to the user.
Thank you very much for your answer.
Do you think that this feature could be added or is it something that would affecting the performances anyway?
Thanks again
There are potential performance risks and some hard-to-solve problems. For example, when relational data changes (even in batches), when should the values of formula fields that reference it be updated.