Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Create new record with foreign key

Topic Labels: API
2521 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I’m having problem to create new record with a link to another record.

An “422” error occurred when trying to create record on
"appfIRESxNQnQ5D05:prodej" : Value “recl8c3CDNQECQCyR” contains
duplicate value. Each record ID must appear only once

I’m not sure what does it mean.

This is an array of fields:

array (6)
id => 173
jmeno_prijmeni => "Petr Ogurčák" (14)
email => "petr@ogurcak.cz" (15)
datum => NULL
zpusob_dopravy => "recl8c3CDNQECQCyR" (17)
zpusob_platby => "reccQSEWSSsVCVtnb" (17)

And the same data in json
"{"fields":{"id":173,"jmeno_prijmeni":"Petr Ogur\u010d\u00e1k","email":"petr@ogurcak.cz","datum":null,"zpusob_dopravy":"recl8c3CDNQECQCyR","zpusob_plat ... "

1 Reply 1

Hi Peter,

Your links fields take an array of IDs. Looks like you’re passing in a string.

Also, it’s best to contact support with questions like this so you don’t accidentally put sensitive data on a public forum.

Alex