Hi,
I’m trying to pass an empty string like the code below but it only outputs Bad Request Error. What should be the other way to save an empty value to the field via API
var form = new FormData();
form.append("field_54", "");
var settings = {
"url": "https://api.tadabase.io/api/v1/data-tables/{{tableId}}/records/{{recordId}}",
"method": "POST",
"timeout": 0,
"headers": {
"X-Tadabase-App-id": "{{appId}}",
"X-Tadabase-App-Key": "{{appKey}}",
"X-Tadabase-App-Secret": "{{appSecret}}",
"Content-Type": "application/x-www-form-urlencoded"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Hi, and thanks for bringing this to our attention.
It appears there’s a bug in the API. There must be at least one value being saved during an API call. Here you’re updating a record without setting any values and the system is seeing that as an error. This is a bug on our end and we will resolve this as soon as possible.
To bypass this until we patch it, simply add another field to the call and set that to any value.
var form = new FormData();
form.append("field_54", "");
form.append("field_55", "Added Via API");
Now it will clear field_54 since there is a valid field being saved.
I’ll update you here when this has been resolved. I apologize about the inconvenience this must be causing.
Thanks for your help but I think that doesn’t fit with our requirements. Even empty string or null doesn’t work as well. Please inform us immediately for any patch update. Thanks for the effort
Thanks for the swift reply and video. What I’m actually trying to do is to clear the connection rather than leave it untouched. What would I need to pass from integromat to delete the connection to the other record?
Thanks Tim, actually I think I’ve found the answer. I can clear the connection field by sending a null from Integromat.
My scenario sends an array to the connection field and I assumed that if the array was empty then it would clear all connections but I needed to go one further and send a null.