At present, Baserow enables you to add a link field to your forms wherein you can then identify it as a “single” link or a “multiple” link. While this is good for records where the options are already available in the system, it’s not good for people who want to use forms that enable people to submit reports or information while keeping data normalized and linked.
It should also be noted that other similar solutions like NocoDB have some availability for this. In order to achieve this a few modifications would be necessary. To demonstrate, we can imagine a simple structure:
Table: Reports
Fields: Name, Submitter, Report Data (link)
Table: Report Data
Field: Type, Value, Report (link)
We want to create a Form view for reports, that allows a user to submit a report with multiple linked Report Data.
- When adding the “Report Data” field we should have a radio option for:
- No New Entries
- Allow New Entries
- Require New Entries
- When selecting either of the latter two we subsequently need to select a Form view on the linked record type (“Report Data”) to use for new entries.
When a user then goes to view the “parent” form (to submit a new Report), they are presented with the traditional linked record UI, however, if the “Allow New Entries” option is selected, there is an additional “+ Add ”, e.g. “+ Add Report Data” which, when clicked opens the selected related form in a modal enabling them to create the new entry. Upon submission, the child “Report Data” entry is submitted, and the id is returned and linked.
If the “Require New Entries” was selected, the user will only have the option to “+ Add Report Data” and will not be able to link to existing entries in the linked table.
If a linked record created from the parent Form is deleted from the parent form, it should remove that entry in the child table (as to enable mistakes and limited garbage data not ultimately linked to the parent).
Linked records added in this way could also have an “edit” icon which allows the data to be edited.
By leveraging linked record forms, users can create custom modal forms for dependent records. In principle this could be recursive if the modal UI was done right.