Skip to main content

POST request to lookup field

  • October 28, 2020
  • 5 replies
  • 28 views

  • New Participant
  • 3 replies

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?

5 replies

ScottWorld
Forum|alt.badge.img+35
  • Genius
  • 9808 replies
  • October 28, 2020

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.


  • Author
  • New Participant
  • 3 replies
  • October 28, 2020

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.


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?


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • 9808 replies
  • October 28, 2020

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?


Yes, by writing the linked record ID into the linked record field.


  • Author
  • New Participant
  • 3 replies
  • October 28, 2020

Yes, by writing the linked record ID into the linked record field.


Hmmm
Is it possible to substitute the ID with a value, like “Name”/UID…?

ie: ‘connect to the row where “[A_COLUMN_VALUE]”=jk549amm23b23t57G’


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • 9808 replies
  • October 29, 2020

Hmmm
Is it possible to substitute the ID with a value, like “Name”/UID…?

ie: ‘connect to the row where “[A_COLUMN_VALUE]”=jk549amm23b23t57G’


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.)