Help

Re: Button in Interface: Create Multiple New Linked Records using Automations

Solved
Jump to Solution
3033 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Layla_Barron
5 - Automation Enthusiast
5 - Automation Enthusiast

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

1 Solution

Accepted Solutions
TheTimeSavingCo
17 - Neptune
17 - Neptune

Hi Layla, here’s something to get you started

Create # records via script

Scripting work sometimes needs to be pretty tailored to one’s base / table setup, and if you hit issues you can also hire me to set it up for you too!

See Solution in Thread

6 Replies 6
TheTimeSavingCo
17 - Neptune
17 - Neptune

Hi Layla, here’s something to get you started

Create # records via script

Scripting work sometimes needs to be pretty tailored to one’s base / table setup, and if you hit issues you can also hire me to set it up for you too!

Amazing - this works perfectly. Thank you so much Adam!!

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)

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

@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?

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.