Help

Re: Where to add: "typecast": true (when column type is checkbox)?

238 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Dev_Local
6 - Interface Innovator
6 - Interface Innovator

I changed a column in Airtable from text to a checkbox (I am filling in with TRUE/FALSE (all caps)).

Now I get this when I try to insert:

  data: {
    error: {
      type: 'INVALID_VALUE_FOR_COLUMN',
      message: 'Field "Active" cannot accept the provided value'
    }
  }

I have seen articles saying to add:

"typecast": true

but this does not work. I’m not sure that I’m adding after the right curly bracket, as none of the articles I read are explicit on this, other than ‘add “typecase”: true’ somewhere.

I don’t know whether to add it after each fields entry like so, or somewhere else?

 {
   "fields": 
	{
		"key": "value",
		"key": "value"
	}, "typecast": true
 },

It is obviously being added in the wrong place, I am getting:

  data: {
    error: {
      type: 'INVALID_REQUEST_BODY',
      message: 'Could not parse request body'
    }

Is there an example JSON that anyone can share that has been successfully used here?

11 Replies 11
msafi04
5 - Automation Enthusiast
5 - Automation Enthusiast

“typecast”: true after the records worked for me!

sun_gajiwala
4 - Data Explorer
4 - Data Explorer

Hello chat this worked like a charm for me. At the top of your JSON just write {"typecast" : True}

The "T" has to be capital.

{
"typecast" : True,
"performUpsert": {
"fieldsToMergeOn": [
""
]
},
"records": [
{
"fields": {
'': row[''],
'': row[""].split(',') if isinstance(row[""], str) else []
}
}
for _, row in batch_df.iterrows()
]
}