Dec 04, 2021 01:46 PM
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
Dec 14, 2021 09:33 AM
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
}
Dec 15, 2021 12:50 PM
That looks good, thanks Joe!