Filter Airtable records by checking if column value exists in array

I’m working with an Airtable base that has a table called Items. This table has a field called Type and I need to filter the records based on multiple values that users select.

Basically, I have an array like ['electronics', 'books', 'home'] and I want to get all records where the Type field matches any of these values. It’s similar to using an IN operator in SQL.

I’ve been trying different approaches with the Airtable API but can’t figure out the right way to structure the filter formula. Has anyone dealt with this kind of filtering before? What’s the proper syntax to check if a field value is contained within a list of possible values?

You can use the FIND function inside OR statements to make this work. I dealt with something similar when we needed to filter product categories for a client dashboard.

Instead of building long OR chains, try this approach:

OR(FIND('electronics', {Type}), FIND('books', {Type}), FIND('home', {Type}))

The FIND function returns the position if it finds the text, or an error if not. Since any non-zero number evaluates to true in the OR statement, this works perfectly.

If you need to build this dynamically in code, I usually map over the array and create the FIND statements, then wrap the whole thing in OR. Much cleaner than concatenating a bunch of equals comparisons.

One thing to watch out for - FIND does partial matching, so ‘book’ would match ‘books’. If you need exact matches, stick with the equals approach the other answer mentioned.

The OR function is definitely your friend here. I ran into this exact same issue about six months ago when building an inventory filtering system. You’ll want to construct your formula using nested OR statements to check against each value in your array. Something like OR({Type} = 'electronics', {Type} = 'books', {Type} = 'home') should work for your use case. The key thing I learned is that Airtable doesn’t have a native IN operator like SQL, so you have to explicitly check each condition. If you’re dealing with a dynamic array where the values change frequently, you might need to programmatically build this formula string in your code before sending it to the API. I ended up writing a small helper function that takes my array and generates the OR formula automatically. Works much cleaner than hardcoding all the conditions every time.