Help

Re: Simple filter on field

530 0
cancel
Showing results for 
Search instead for 
Did you mean: 
User_airtable
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

I am new to Airtable. I have read the documentation (several times!) but I can’t seem to get my head around a simple filter when using the API (curl).

My URL: “https://api.airtable.com/v0/{AIRTABLE_BASE_ID}/{TABLE}?fields[]=&filterByFormula=DATE_START+>+‘2021-...

The field DATE_START is a date and I am trying to query for dates later than a given. The error I am getting at the moment is:

{‘error’: {‘message’: ‘Unknown field name: “”’, ‘type’: ‘UNKNOWN_FIELD_NAME’}}

So my understanding is that the formula is not correct. I am using the URL enconder provided in the documentation and I suspect that the error may be in the formula itself (date later than X). My formula can be used from the graphic interface, but I can’t find the way to translate it to “code”

Any help would be very much appreciated.

Thanks

3 Replies 3

You already posted this exact same question here, and @kuovonne already gave you the answers.

Once again, you should create your formula field in Airtable first, and when you get your formula working properly in Airtable, then you can URL Encode that working formula.

DO NOT try to use the REST API until you have successfully created a working formula in Airtable first. If you don’t have a working formula in Airtable, then it’s not going to work in the REST API either.

Both times you have posted this question, you have posted an invalid formula.

When you are finally ready to dive into the REST API — only after you have created a working formula in Airtable — then you can refer to the REST API documentation here (as @kuovonne already told you).

As the REST API documentation states: the formula will be evaluated for each record, and if the result is not 0 , false , "" , NaN , [] , or #Error! the record will be included in the response.

This is actually a different request with a different formula and an addition fields parameter. This is also a different error.

However, the fix is the same. Go back to the documentation. Do just one parameter at a time until it works correctly and you fully understand it every part of the request. Then try a request with a different parameter. After that works and you understand it, try combining the parameters.

User_airtable
5 - Automation Enthusiast
5 - Automation Enthusiast

Got it! Thank you both