Help

Re: Curl get records by field

1657 0
cancel
Showing results for 
Search instead for 
Did you mean: 
panorama530540
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi,

I want to get from a table all the records, filtered by one of the columns.
For example: I have a field called “SKU”. There are many records in the table with the same SKU, different dimensions of the same products.
I want to get, with CURL, all the records with SKU = 1000.
How can I do that?

Thanks!

5 Replies 5

Thanks for your reply, but it doesn’t work for me yet.
I try to write like that:
https://api.airtable.com/v0/MY_APP_KEY/MY_TABLE_NAME?filterByFormula=SEARCH(“SKU”%2C+“1001”)

or in a language that human can understand: SEARCH(“SKU”, “1001”)

I get an empty array. I have more then 30 records with 1001 in the SKU column.

What can be the problem?

Put your field name in curly braces, not quotes.
If your field value is a text string, make sure you put the value in straight quotes, not curly quotes. Also put the string to find first.
If your field value is a number, remove the quotes and use an equation.

SEARCH("1001", {SKU})

or

{SKU} = 1001

Try testing the formula in a formula field in the base to make sure it works.

Nothing about cURL is a language humans can understand. :winking_face: But now that this additional requirement has been exposed, I shall ponder it. In the meantime - I suspect you are experiencing URI encoding issues in your attempt.

It works!! Thank you so much :slightly_smiling_face: