Mar 26, 2024 10:11 AM - edited Mar 26, 2024 10:12 AM
Hi,
I am new to Airtable coming from Xano and using Thunkable as my mobile front end.
In Xano I can create and API endpoint which will allow me to search for a specific value in a column in a table. I see that I use the AirTable API to get a record but that is by record id.
If I wanted to search by a field, email address for example, how would I accomplish this?
Thanks
Steve
Solved! Go to Solution.
Mar 26, 2024 11:04 AM
You can search the list using fields. Let's say I have a table that contains columns `source,` `name,` etc. Now, I want to get a list using a query that matches the `source` field/column and returns the field name and source
Here's how to do it:
My Formula: IF(LOWER(source) = LOWER("query"), 1, 0)
Encoded URL (Use this tool to transform your request to an encoded URL):
https://api.airtable.com/v0/<base>/<table>?fields%5B%5D=source&fields%5B%5D=name&filterByFormula=IF(LOWER(source)+%3D+LOWER(%22query%22)%2C+1%2C+0)
Send a GET request, and it'll return the search result. I hope it helps!
Mar 26, 2024 11:04 AM
You can search the list using fields. Let's say I have a table that contains columns `source,` `name,` etc. Now, I want to get a list using a query that matches the `source` field/column and returns the field name and source
Here's how to do it:
My Formula: IF(LOWER(source) = LOWER("query"), 1, 0)
Encoded URL (Use this tool to transform your request to an encoded URL):
https://api.airtable.com/v0/<base>/<table>?fields%5B%5D=source&fields%5B%5D=name&filterByFormula=IF(LOWER(source)+%3D+LOWER(%22query%22)%2C+1%2C+0)
Send a GET request, and it'll return the search result. I hope it helps!
Mar 26, 2024 12:33 PM
Thanks for the information Will give it a shot!