Working with two tables in Airtable API

Got through the movie tutorial and am trying to set up the AirbTable API. I am able to get the “Get All” to work in testing, but cannot get “Get One” to work. App ID 95940. Appreciate any help on this. Really like the platform so far.

And while I am asking for help…My app has two tables: “users” (about 10 data elements about the user) and “trips” (6-7 data elements about each trip). One user will have many trips. What is best design for setting this up? Should users be a local table and trips accessed through the AirTable API? Or both table accessed through the API? Any breadcrumbs and/or documentation would be appreciated.

Thank you

GP

1 Like

Hi,

For the first question :

  1. In your data source Airtable_Users, activate GET(ONE) method with relative path /{id} and url placeholder id
  2. Create a page variable userId
  3. On the same page, create a new data variable userSingle (single data record)
  4. In your logic, create a Get Record and select data source Airtable_Users, id should be pageVars.userId
  5. Create a Set data variable to userSingle, connect to Get Record, and configure value to output value of Get Record / Record
  6. You can now user your data variable value userSingle.fields anywhere

For the second question, it depends also if a trip can have multiple users. You can have two data sources pointing to 2 tables. If not, the easiest would be to :

  1. Create 2 independent pages for Users and Trips : each has a repeated list (table) and an info box
  2. Use navigation logic Open page and page parameter pointing to the selected User to filter Trips list

Hope this helps.

Trips can only have one user. What would be the approach then?

Clarification: I am in the Data tab connecting the Airtable API. “Get All” tests fine. “Get One” does not. App ID is 95940. Seems like something not right with “id”

Thank you

I sorted this out.

Thank you for the help

2 Likes