Title: Auto-fill parent record in subform (selection field use case)
Hi everyone,
I’m working on a use case in NocoBase and wanted to check the best approach.
Use Case
I have a Candidates collection (parent).
Inside the form, I’m using a selection field shown as a subform-like UI to add related records.
In those related records:
- Some fields are filled manually by the user
- One field (
candidate) is a relation back to the parent (Candidates)
What I want
When creating a new Candidate and adding rows in this subform:
- I want the
candidatefield in each row to be automatically set to the current parent record
Problem
- Since this is on the create form, the parent record ID doesn’t exist yet
- I want to achieve this without using workflows
Example
Parent:
- Candidate: John
Subform rows:
| Field | Value |
|---|---|
| Skill | Java |
| Candidate | (should auto-fill → John) |
Question
What is the best way to:
- Auto-fill the parent (
candidate) field in each row - While still allowing manual input for other fields
- Without using workflows?
Thanks in advance!