Dec 20, 202207:55 AM - edited Dec 20, 202207:56 AM
Hi all! Hoping you can help me with something.
Context- I need to be able to load a template via an interface (therefore, can't set up a button to do it). There is a handy little extension in Airtable called "Create records for multiple templates" that basically sets up a script for you to achieve this. However, because I need to move this into an automation, and the automation action "run a script" can't communicate with the extensions dashboard, I need to convert the dashboard script to work for automations.
I've updated the //define fields from script settings portion, but I haven't worked out how to hard code in the part where it wants user input on which record to choose. I've pasted the script below, and the lines (I think) that are the issue are 24-34 (under the // Select parent record to create child records & select type section). I basically want it to run the script on the record in which the automation is triggered by.
So in this case, there is a checkbox that will be checked, and I want the script to run on that record.
Any help would be greatly appreciated!
Script as follows:
// Define tables from script settings
let parentTable = base.getTable("LOA Log");
let typesTable = base.getTable("Projects");
let childTable = base.getTable("LOA Tasks");
let templateTable = base.getTable("PROCESS TEMPLATES");