Nov 02, 2022 08:04 AM
Hi There!
Fairly new to airtable - and loving it!
Context:
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)
Problem
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!
Thanks
Layla
Solved! Go to Solution.
Nov 02, 2022 11:24 PM
Nov 02, 2022 11:24 PM
Nov 03, 2022 04:34 AM
Amazing - this works perfectly. Thank you so much Adam!!
Jun 14, 2023 02:46 PM
I copied your base in my workspace so I can have the workflow. After implementing it on my base, I can't delete it. Can you please let me know how can I delete your base from my workspace? i have tried all (that I know of course)
Jun 26, 2023 06:24 AM - edited Jun 26, 2023 06:51 AM
Hey,
This is just what I need right now. Thank You! Anyway, I get an Error from testing the script. It says:
"ERROR
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?
thanks
//Mikko
Jun 27, 2023 03:30 AM
@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?
Jun 27, 2023 03:43 AM
Thanks...
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.