One of my fields is a link to another table. I’d like end-users who are using the Form to add data to be able to create new records in the linked table but from the primary table data entry form.
@Airtable Unbelievable that this feature is 1) not included out of the box and 2) that Airtable has not heard their customer base and added the feature. It makes me question my subscription. How can you tell people they can build a relational database via linked table fields and then not support creation of child records in a form? This seems ridiculous to me, seeing all these requests and the obvious dismissal of them.
Thought I would share my workaround for adding records to a (simple) related child table when submitting the form of the parent record. It’s not ideal, but it works.
In my example, I created a form so people could sign up to donate items for resettling refugees. But, we want to cross reference the item(s) donated by one person to the need(s) requested by another person so we can plan pickups and deliveries more efficiently. To skip the admin process of entering a row for each item on the side of the donation as well as the side of the needs request so they can be matched, I added a multi-select “Items” field to each “header” table and form, which requires the user to select the items they need or are donating and that gets saved to the header record. My automation script is triggered on insert of the header record, takes the selected “items” from the multi-select field, loops through them and creates a row in our “Item Donations Detail” table and relates it to the parent “Item Donation” or “Item Needs” header record. I had to create a separate automation script for each header table insert event. Attaching a screenshot of the Item Donation automation script.
Here is the text of the script if you want to copy/paste/refactor.
let inputConfig = input.config();
let table = base.getTable(“Item Donations Detail”);
let donation_id = inputConfig.donation_id;
let items = inputConfig.donation_items;
let linkField = “DonatedItem”;
let itemLinkField = “Item”;
let i=0;
if (items.length > 0) {
for (i=0;i<items.length;i++) {
await table.createRecordAsync({
[linkField]: [{“id”: donation_id}],
[itemLinkField]: [{“id”: items[i]}]
});
}
}
Obviously @Airtable isn’t looking at this thread since it’s over 5 years old with no further updates from them, but just thought I’d add support for this feature. Would make it so much easier to use for collaborative projects if this feature existed.