Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jun 02, 2023 02:48 AM
I want to add a new element to my multiselect field. For example, multiselect field is teams and it already has team A, team B, etc. but 'team C' is never inserted. It's a new value for the field.
I am doing this: (in python)
Jun 02, 2023 06:11 AM
Hey there! Based on the error message returned, one possibility is that the typecast parameter is not enabled in your request. When creating or updating records, if the choice string does not exactly match an existing option, the request will fail. If typecast is enabled, a new choice will be created if one does not exactly match. We'd recommend visiting the API documentation under "Create records" for an example of including the typecast parameter in your request body.
As a quick note: the Airtable.py python package is maintained and run by the community where it follows our API methods, so while we cannot give definite guarantees on errors, it might be that the syntax is slightly different than in our API. The typecast parameter should be set to a boolean value of either "true" or "false," so depending on how you are currently passing in the parameters, you can just add the additional typecast parameter and set it equal to true.
Jun 05, 2023 01:56 AM
I am using this line to update: at.update(str(settings.TABLE), str(rec_id), dataset)
dataset is a dictionary with names of fields and values, how do i add typecast parameter?
Jun 07, 2023 06:08 AM
We aren't able to provide guidance on unofficial API clients, though I would encourage you to explore the other unofficial Python client, pyairtable. It is well maintained and also has dedicated documentation that can help with questions like this (e.g. examples using typecast can be found here). Hoping this can help!