Skip to main content

Automation - Create Record to run a script


Hi all,

Having a bit of issue with setting up an Automation. I was wondering if someone could help me?

When a new record enters “Tab B”, I want it to link to “Tab A” if the ‘Vehicle Registration’ matches.

“Tab A” will already have all Vehicle Registrations listed, so any new records entering “Tab B” will not be random or different.

At the moment I’m having to manually click on the Linked Fields column in order to add the record from 'Tab B" to “Tab A”.

I have a feeling this might be an easy to do in JS but I’m confusing myself at the moment.

Any help would be greatly appreciated!

Mitch

6 replies

Kamille_Parks11
Forum|alt.badge.img+25

Try looking at this answer to another thread:


Kamille_Parks11 wrote:

Try looking at this answer to another thread:


Hello, @Kamille_Parks.
Can you help with that as well?
I have a main table called Upcoming Events and I have another table called Design Services.
If any field is updated into the main table, I should update the Design Services table.

I couldn’t make using your script.


Kamille_Parks11
Forum|alt.badge.img+25
Adriano_Gritti wrote:

Hello, @Kamille_Parks.
Can you help with that as well?
I have a main table called Upcoming Events and I have another table called Design Services.
If any field is updated into the main table, I should update the Design Services table.

I couldn’t make using your script.


You can’t pass the record ID from Upcoming Events into PS - Design Services because that record ID only exists in Upcoming Events.

Are you using my script at all? Nothing in that screenshot indicates that you are, as you’re only pulling values from the trigger record.


Kamille_Parks11 wrote:

You can’t pass the record ID from Upcoming Events into PS - Design Services because that record ID only exists in Upcoming Events.

Are you using my script at all? Nothing in that screenshot indicates that you are, as you’re only pulling values from the trigger record.


Hi Kamile,
I am sorry…I am not familiar with scripting
Here is the screenshot


Kamille_Parks11
Forum|alt.badge.img+25
Adriano_Gritti wrote:

Hi Kamile,
I am sorry…I am not familiar with scripting
Here is the screenshot


Your Line 1 of the script isn’t supposed to be part of the script itself. In the thread you were following I was describing how to do this with an Automation Script Action, not the Scripting App. You have given a screenshot of the Scripting App.

Correct the spelling of .selectRecordsAsync() (that’s my mistake), move the code into a “Run a script” step of an Automation, and instead of including Line 1 set up an input variable within the Run a Script action (it will be the left side of the screen when editing the code) using that format.


Kamille_Parks11 wrote:

Your Line 1 of the script isn’t supposed to be part of the script itself. In the thread you were following I was describing how to do this with an Automation Script Action, not the Scripting App. You have given a screenshot of the Scripting App.

Correct the spelling of .selectRecordsAsync() (that’s my mistake), move the code into a “Run a script” step of an Automation, and instead of including Line 1 set up an input variable within the Run a Script action (it will be the left side of the screen when editing the code) using that format.


Hi Kamille…
Thanks a lot for your advise.
I understood now.
To run a script action I need to upgrade my airtable account.
I will ask my manager to do so.
Thank you for your help


Reply