Mar 31, 2024 01:14 AM
Hi there, i'm having issues with letters' case in my filterByFormula text and API call.
I'm trying to do a searching box where user can give an input of what they are looking for, and Airtable fetches from a big database.
Right now if i'm looking for "Hilfinger" it actually works alright and returns a few records, but if I type "hilfinger" it won't find anything.
Here is my API call, i hope you can help:
https://api.airtable.com/v0/appk7bV1OTtj*****/Offerte?filterByFormula=SEARCH(%22TEXT+HERE%22%2C+%7BNome+Oggetto%7D)&sort%5B0%5D%5Bfield%5D=Identificativo&sort%5B0%5D%5Bdirection%5D=desc
What would be ideal to happen is that Airtable gets the records even if cases are lower of uppercase.
Thank you very much, any help would be much appreciated
Solved! Go to Solution.
Mar 31, 2024 08:42 PM
Try wrapping both your user input and your field value inside a "LOWER()":
https://api.airtable.com/v0/appk7bV1OTtj*****/Offerte?filterByFormula=SEARCH(LOWER(%22TEXT+HERE%22)%2C+LOWER(%7BNome+Oggetto%7D))&sort%5B0%5D%5Bfield%5D=Identificativo&sort%5B0%5D%5Bdirection%5D=desc
Mar 31, 2024 07:01 AM
Airtable offers a LOWER() function and an UPPER() function, which forces text to either all lowercase or all uppercase.
You can learn more about Airtable’s formula functions on this page: https://support.airtable.com//docs/formula-field-reference
p.s. If your company has a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consultant — ScottWorld
Mar 31, 2024 08:42 PM
Try wrapping both your user input and your field value inside a "LOWER()":
https://api.airtable.com/v0/appk7bV1OTtj*****/Offerte?filterByFormula=SEARCH(LOWER(%22TEXT+HERE%22)%2C+LOWER(%7BNome+Oggetto%7D))&sort%5B0%5D%5Bfield%5D=Identificativo&sort%5B0%5D%5Bdirection%5D=desc
Apr 03, 2024 11:41 PM
That's perfect, thank you.
For future references, i just add to add another ")" to your code, but that was great