Skip to main content
Solved

SEARCH in filterbyformula case sensitive

  • March 31, 2024
  • 3 replies
  • 196 views

Forum|alt.badge.img+5

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

Best answer by TheTimeSavingCo

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

 

 

3 replies

ScottWorld
Forum|alt.badge.img+35
  • Genius
  • March 31, 2024

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 


TheTimeSavingCo
Forum|alt.badge.img+31

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

 

 


Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • April 4, 2024

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

 

 


That's perfect, thank you.

For future references, i just add to add another ")" to your code, but that was great