filterByFormula against AirTable part 2

Hi,

There is a very informative thread on performing a filterByFormula against an AirTable base.

While this shows a solution for passing more than 1 search variable, I am trying to get a search done against a View.

The API call (https://api.airtable.com/v0/***base***/***table***?filterByFormula=AND({reg}=“D34”)&view=OdoDateTime) works fine in Postman.

However, when I try various implementations in Thunkable -

2024-04-03 20 38 46

and this

2024-04-03 20 42 47

I get

{"error":{"type":"INVALID_FILTER_BY_FORMULA","message":"The formula for filtering records is invalid: Unknown field names: view, ododatetime"}}

Would appreciate any assistance.

Thanks

It’s really helpful that you included the link to that original topic because it explains what you have reviewed and also gives me a refresher about this tricky object creation for Airtable’s API.

The first screenshot looks right to me. Is the create object block connected to a QueryParameters block? And are you using a Get block to contact the API?

As a troubleshooting step, if you use the first screenshot’s configuration and set a text input’s text (so you can copy and paste here) to output the formula, what do you get? The easiest way to do that is probably to set the text input’s text to the join block.

I’m not sure it will work but Airtable has changed in certain ways since that original topic. Have you tried entering the entire url (https://api.airtable.com/v0/***base***/***table***?filterByFormula=AND({reg}=“D34”)&view=OdoDateTime) as the Web API url and not worrying about the query parameters? I think you would format it as
https://api.airtable.com/v0/***base***/***table***?filterByFormula=AND(%7Breg%7D=%22D34%22)&view=OdoDateTime

@tatiang I figured it out - was staring me in the face another post -

2024-04-04 08 25 09

Steve

1 Like

Oh! That makes so much sense now. Thanks for posting the solution!

1 Like

Slightly more complicated now. Want to run a REGEX_MATCH to find a value contained in a cell.

The URL is https://api.airtable.com/v0/base/table?filterByFormula=REGEX_MATCH({fruit}, “grape”) tested in Postman.

I tried this in vain -

Thoughts??

Fruits missing curly braces. Your searchfruit value is missing quotations.

1 Like