Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Scripting: Get table from a record or from button press?

Topic Labels: Extensions
Jump to Solution
1084 2
Showing results for 
Search instead for 
Did you mean: 

I have a base with several tables of school programs that students can sign up for through a Jotform. I do not want to merge these tables into one because each program has various data/fields that are unique to it. However, there are a set of fields that are the same, such as those concerning student personal info (email address, phone number, address, etc.).

I would like a single script that can do some processing on such fields that are named the same across multiple tables using buttons. In scripting, typically I set the table explicitly via something like

let table = base.getTable(“Table Name”);

I am wondering if there is any way I can either:

  • Get the table that a button was pressed in or
  • Get the table that a record exists in

I know I can make multiple copies of a script and just change the base.getTable() part, but I’d rather keep this as a single script that works on multiple tables. Any suggestions? Thanks!

1 Solution

Accepted Solutions

A cursor might be what you are looking for.

See Solution in Thread

2 Replies 2

A cursor might be what you are looking for.

That’s exactly the thing that I overlooked! Thank you!