I’m stuck with a tricky Airtable query. My wedding guest list has people with hyphenated last names. The problem is when someone puts in just part of their last name on the RSVP form.
For example, if someone’s last name is “Smith-Jones” but they only write “Smith”, Airtable can’t find them. I tried using REGEX and filterByFormula, but it’s not working right.
I’ve dealt with a similar issue in my event planning business. What worked for me was using a combination of FIND() and SEARCH() functions in Airtable, coupled with some JavaScript magic.
This approach casts a wider net. It checks for exact matches using FIND() and partial matches using SEARCH(). The LOWER() function helps catch variations in capitalization.
In my experience, this method caught about 95% of the tricky surname cases. For the remaining 5%, I ended up doing a manual review. It’s not perfect, but it saved me tons of time compared to checking everything by hand.
Remember to test thoroughly with your specific data set. Good luck with your wedding planning!
Have you considered using a combination of FIND() and SEARCH() functions in Airtable? This approach might be more effective for partial surname matches. Here’s an idea:
This formula checks if the first name matches exactly and if the last name is contained within the full surname field. It’s case-insensitive, which helps catch more variations. You could implement this in your JavaScript code like this:
This method should catch partial matches in compound surnames without relying on complex regex. Let me know if you need any clarification on implementing this approach.