Hello guys, I am trying to insert Multiple Select data into Airtable. When I select only ONE data, it successfully inserts it into Airtable. But selecting more than one data gives error. Yes, I have already checked and data is perfectly identical on both sides, not even a space difference.
(Note: I am not trying to insert new data, the same data is in the Airtable already)
Welcome to the community, @Samundra_Shahi! :grinning_face_with_big_eyes: I’m not familiar with Retool, but under the hood Retool is (most likely) using Airtable’s REST API to change things, so you need to ensure that the data is valid based on that API’s requirements. For a multiple-select field, you need to pass an array of strings, and it looks like Retool is creating a single string that contains all of the items:
"Standard Selection,Premium Selection"
I’m not sure what kind of data-manipulation features Retool gives you, but I’m hoping that it has a basic string split feature to turn a string into an array. In short, split that string by commas, which should create an array something like this:
["Standard Selection","Premium Selection"]
This split operation would be safe to run on single choices as well, as it would create a one-item array. (Apparently Airtable has been auto-converting a string with a single choice into a one-item array on its side of things, which is why you haven’t had any errors in that situation, but it’s still best to structure the data as Airtable prefers.)