Dec 06, 2019 03:47 PM
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?
Aug 07, 2023 08:57 PM
“typecast”: true after the records worked for me!
Aug 27, 2024 09:17 AM - edited Aug 27, 2024 09:19 AM
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()
]
}