Use the "search" function in the "filter by formula" of Airtable plugin with a lookup record


I have two tables: Clients and Employees. Employees is linked to Clients and a column “client_id” displays the related airtable client id.
I would like to use the filter by formula in the Airtable plugin to find all records in the Employees table that have the related airtable id.

What can I use ?

1 Like

Hi @MaxenceP :wave:

Here are the docs on the subject: Airtable data source | WeWeb documentation

The tricky part is getting the quotation marks right but the use case presented in the article seems to match very closely to what you’re trying to do

Hi Joyce and thank you for your answer.

I’ve already used the search function of this doc for a more basic approach: a simple column in a table and it works great.
Here it doesn’t work, probably because the column I’m doing my search is an array.
The forumula I tried is this one 'SEARCH("'+weweb_variable_for_entreprise_id+'",entreprise_id)' where entreprise_id is the lookup field of my clients table.


It took me a while. Here’s the whole process: Maxence - filterByFormula with list in Airtable — Tella

Want to skip ahead?

  • use the ARRAYJOIN formula in Airtable to turn your array into a string
  • this will allow you to use Airtable’s FIND or SEARCH formulas (which can only search through strings) when setting up your collection in WeWeb

Thanks for the inspiration @MaxenceP! Even though it’s an Airtable limitation, it’s a great topic for a future WeWeb tutorial.

Wow great work, you saved me a lot of time here…
Thanks a lot

1 Like