Help

Getting "INVALID_VALUE_FOR_COLUMN" with typecast = true for a Single Select field

732 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Richard_Quintan
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello there, I'm trying to write data from one base to another through Airtable's API. My JSON is something like this:

 

 

let body = {
  "fields":{
        "prod_serv_cia_id": inputConfig.cia_id[0],
        "NroParte": inputConfig.codigo[0],
        "DescripCorta": inputConfig.descrip[0],
        "DescripLarga": inputConfig.descrip[0],
        "Marca": inputConfig.marca[0],
        "Cantidad": inputConfig.disp[0],
        "Costo": inputConfig.costo[0],
        "AlmacenesScript": inputConfig.cia[0],
        "StatusProducto":[
          { "id": "selq********yr", "name": "1. Producto seleccionado" }
        ],
        "typecast": true
        },  
}

 

 

And the response I'm getting from the Airtable's API is:

 

 

{error: Object}
error: Object
type: "INVALID_VALUE_FOR_COLUMN"
message: "Cannot parse value for field StatusProducto"

 

 

The "StatusProducto" field is:

 

 

{id: "fld*******j9", name: "StatusProducto", description: "", type: "singleSelect", options: Object…}
id: "fld*******j9"
name: "StatusProducto"
description: ""
type: "singleSelect"
options: Object
isComputed: false

 

 

So, what can I do with that field in order to send the JSON correctly and write a new record in that Single Select field? Thanks in advance for your help!

0 Replies 0