Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charltoons/c4a85e5995d8bac8b67e87460c9bedcd to your computer and use it in GitHub Desktop.
Save charltoons/c4a85e5995d8bac8b67e87460c9bedcd to your computer and use it in GitHub Desktop.
// This is a partial script to get the Table of the current record.
// It allows you to avoid hardcoding the table name in `base.getTable()`.
// You need to set up an input of the current Record URL using the name `recordUrl`.
const inputConfig = input.config()
const recordUrl = new URL(inputConfig.recordUrl)
const tableId = recordUrl.pathname.split('/')[2]
const table = base.getTable(tableId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment