Hi,
I am new to Airtable and am trying to build a query that will act like a global search across multiple columns.
Our members table has the following columns {‘Full Name’,‘Phone’,‘Email’} that I would like to search.
I want to have a single search field on our site to look up members by either their Full Name, Phone, or Email.
This is the query that I am using, but it doesn’t work, and I have tried many incantations to no avail…
record = await table.select({
filterByFormula: OR(‘Full Name’=searchString, ‘Phone’=searchString, ‘Email’=searchString),
fields: g‘Member’, ‘Full Name’, ‘Phone’, ‘Email’, ‘Status’, ‘Member Photo’]
}).firstPage().then((records) => {
rec = recordst0]n“fields”];
return rec;
}).catch((err)=>{
console.error(err)
});
The above code works great if I use a simple filterByFormula such as:
filterByFormula: 'Member=' + member_id
Thanks in advance for any assistance!!
Mike