gtalarico / pyairtable

Python Api Client for Airtable
https://pyairtable.readthedocs.io
MIT License
765 stars 138 forks source link

Support reference to `table ID`s #158

Closed jonathanlaniado closed 11 months ago

jonathanlaniado commented 2 years ago

You can now refer to table IDs, as opposed to just table names when calling the Airtable API.

See here: https://community.airtable.com/t/latest-changes-to-our-api-sdk-documentation/47550.

IDs and names can be used interchangeably in API requests. Now you have the option to provide field and table ids in your API requests, and receive ids instead of names in the response. That way, you can avoid modifications to your API request even if the name of the field or table changes.

NicoHood commented 2 years ago

Isnt that already working?

What I am still missing though is to filter by a specific field id. Like {Name} = 'john' to something like {fldu34tth45gt7} = 'john'

gtalarico commented 2 years ago

What I am still missing though is to filter by a specific field id.

Does match("fldu34tth45gt7": "john") work @NicoHood ? I haven't tested the new api changes mentioned in link above but if they are interchangeable this should work.

@jonathanlaniado I haven't used the new api but have does `Table("", "", "") work? If so then is perhaps a question of updating docs.

NicoHood commented 2 years ago

Sadly this gives: [Error: {'type': 'INVALID_FILTER_BY_FORMULA', 'message': 'The formula for filtering records is invalid: Unknown field names: fldcxsg01lijsin4p'}]")

I think it is an upstream issue. They just did not implement this feature.

I already asked this upstream: https://github.com/Airtable/airtable.js/issues/321

mesozoic commented 11 months ago

Closing this for now, since it sounds like a feature Airtable would need to implement.

NicoHood commented 11 months ago

I think this is all working now. filter by formula also works since early this year, I am using this actively now.