How to create new record with text of linked record rather than recordid?

Hi,
I have two simple tables
votecount:

emails:

On my react app, i want users to enter their email address and select their chosen city. I want to post that data to my airtable base. I’d like to simply post the email and the city name (not the linked record id) to the emails table.

Please could someone give me a hand with how to do that? I read something about typecast:true but i dont quite understand how that works.
Thank you

Hi Helen, welcome to the community!

I’ve added a sample body for a POST request below – with typecast, this should go ahead and populate the linked record based on the name. Does this help? If not, can you please paste a sample of the request body?

As a reminder, please be sure NOT to post any sensitive info, such as your API key, if you post a sample~

{
  "records": [
    {
      "fields": {
        "email": "example@gmail.com",
        "votecount": [
          "Leicester"
        ]
      }
    },
    {
      "fields": {
        "email": "example@gmail.com",
        "votecount": [
          "York"
        ]
      }
    }
  ],
  "typecast": true
}
1 Like

That looks good, thanks Joe!

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.