I have a web form that collects firstName and lastName from users. I need to search an Airtable database of event attendees using these values. The problem is that many attendees have compound surnames separated by hyphens like smith-johnson. When someone fills out the form, they might only enter the first part of their compound name like smith instead of the full smith-johnson. This causes my Airtable query to fail since it can’t find an exact match. I’m trying to use a filterByFormula with REGEX to match the partial surname against the full compound names in the database. Here’s what I attempted:
`(AND({firstName} = "${firstName}",SEARCH(LEFT("${lastName}",FIND("-",{lastName})-1),{lastName})>0))`
This approach isn’t working as expected. Has anyone solved a similar partial matching issue with compound names in Airtable? I need a way to match partial surnames against the portion before the hyphen in stored compound surnames.