Fairly new to airtable - and loving it!
I’m in the process of developing an interface whereby users can view or create ‘parent’ records, whilst also being able to view and update linked child records.
Currently you aren’t able to ‘create’ linked child records in an interface (unless you do them one by one), so I’m looking for a workaround to create those records via clicking a button in the interface to trigger running a script via automations.
The script would work on basis of:
For this record > create X no of linked records in ‘child table’ (X = numerical value in ‘no of child records’ field)
I know there are multiple script examples out there that deal with creation of multiple linked records (namely the script developed by @ Kuovonne in 2020)- but I’m struggling to adapt them to my use case as a lot are built in the scripting app, and throw up errors when using them in scripts within automation .
Very much a scripting newbie so any help or pointers very much appreciated!
Solved! Go to Solution.
This is just what I need right now. Thank You! Anyway, I get an Error from testing the script. It says:
Error: Field "(Field ID)" cannot accept the provided value.
at main on line 12"
I can´t figure this out. @TheTimeSavingCo Do you have any idea what the problem is?
@MayGLoAh sorry about the late reply, I missed your message somehow. I take it you're trying to stop the base from showing up? If so, you'll need to remove yourself as a collaborator. I've just done this and so it shouldn't show up anymore!
@Mikko_Mantere1Hmm that's weird. Could you paste the code you're using or DM me an invite link to your base so I can take a look?
Moment ago I solved the problem by replacing word "recordId" with "RecordID" at the script. Weird, but it worked...
Anyhow, Thanks for the solution Adam. As I said, it´s just what I needed.