Skip to main content
Solved

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

  • March 10, 2021
  • 2 replies
  • 24 views

Forum|alt.badge.img

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!

Best answer by Raminder_Singh

A cursor might be what you are looking for.

2 replies

Forum|alt.badge.img+3
  • Participating Frequently
  • Answer
  • March 10, 2021

A cursor might be what you are looking for.


Forum|alt.badge.img
  • Author
  • New Participant
  • March 10, 2021

A cursor might be what you are looking for.


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