Oct 28, 2020 08:20 AM
Hi
I’m trying to send a POST request to Airtable with two properties: Name (String) and PostedBy (Lookup field).
I keep getting an error unless I remove PostedBy. A new row is created but it is empty.
My json looks like this:
{
"records": [
{
"fields": {
"Name": "${name}",
"PostedBy": "${user.id}"
}
}
]
}
Any Ideas?
Oct 28, 2020 10:13 AM
Lookup fields are not writeable fields. Their data is pulled from another table by a linked record field, so try writing to the linked record field instead. Alternatively, write to the other table which has the original data.
Oct 28, 2020 10:16 AM
Thank you :slightly_smiling_face:
The idea is to create the connection between the new record and an existing record on another table. Is it possible using the API?
Oct 28, 2020 10:23 AM
Yes, by writing the linked record ID into the linked record field.
Oct 28, 2020 10:40 AM
Hmmm
Is it possible to substitute the ID with a value, like “Name”/UID…?
ie: ‘connect to the row where “[A_COLUMN_VALUE]”=jk549amm23b23t57G’
Oct 28, 2020 09:17 PM
That would be cool, but as far as I know, that’s not possible with the API, so you’d have to break it up into multiple API calls.
However, you can do that with Integromat, which is a no-code automation platform that enables you to communicate between other apps & Airtable. You can just turn on the “Smart Links” option in Integromat, and then when you type in the name for the Linked Record field, it will automatically substitute the Record_ID for you.
(Note that I am a professional Airtable consultant and a Registered Integromat Partner, and the Integromat link contains my personal referral code.)