I have an external SQLite data source with two tables: Contacts and Donations. The Donations table has a DonorID field for each donor. I want to have a corresponding (unique) DonorID field on the Contacts table. Naturally, I want to link the donations to the donors (ie. contacts). Now, I can make a “Has Many” Link field on the Contacts table, no problem, but then I have to manually link every donation to the correct contact. As I understand it there is no way to do this automatically, which seems like a major shortcoming of NocoDB, but anyway.
I thought I came up with a clever workaround by making a trigger on the Donations table (outside of NocoDB), so that it would automatically fill in the appropriate link whenever new records were inserted. It would do this by comparing the DonorID between the two tables. So clever, until I realized that the Link fields are not part of the external DB. They exist somewhere in the NocoDB internal database.
So there is no way for the trigger to see and edit the Link field.
So that’s it? Back to doing things manually? That’s not acceptable. So, any idea how to achieve what I want? When I insert (usually pasting in multiple) new donation records, how can I automatically link them to the matching contacts?