Help

Re: API create record fails - null for linked records

1302 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Jamey_Halfast
4 - Data Explorer
4 - Data Explorer

The REST call from Appgyver for a new record fails, because the call has a ‘null’ for a linked record. Appgyver won’t remove the field just because its blank, so a null is sent - and Airtable breaks on it.

3 Replies 3

Assuming that the primary field of your linked table allows data to be written to it, you have 3 choices when posting your data to your linked record field:

You will either need to:
(1) Not send any data to that field at all,
(2) Create a “null” record in your linked table that your linked record field can link to, or
(3) Enable the “typecast” parameter in your API call, which will automatically create the “null” record in your linked table.

Actually, I just realized that “typecast” must be enabled for both the #2 and #3 scenarios above. You must always send a Record ID to a linked record field UNLESS typecast is enabled. Then, you can send the primary field name of an existing record OR a new record that doesn’t yet exist.

It might be also related to linked field expecting array - try sending empty array?