Mar 18, 2024 02:21 PM
I've got a little script on Zapier where if somebody registers for a Zoom meeting, we add them to Airtable. To avoid duplicates, I search for to see if we already have a record for the registrant with a query like this:
OR({Email 1} = "{{email}}",{Email 2} = "{{email}}",{Email 3} = "{{email}}",{Phone 1} = "{{phone}}",{Phone 2} = "{{phone}}",{Phone 3} = "{{phone}}")
However, if Airtable doesn't find the email in any of the three email columns and the {{phone}} is blank, then Airtable will return a result for a record with a blank phone number, which is obviously not what we want here.
Is there any way to construct a query that will not return a match for an empty phone number?
Thanks!
Solved! Go to Solution.
Mar 18, 2024 08:31 PM
Hmm, is it that the result's "Phone 1" value is empty, and as a result it matches and thus returns it? If so, perhaps you add an "AND" there so that it was:
AND(
{Phone 1} = "{{phone}}",
{Phone 1} != ""
)
And you'd update the code for Phone 2 and Phone 3 accordingly
Mar 18, 2024 08:31 PM
Hmm, is it that the result's "Phone 1" value is empty, and as a result it matches and thus returns it? If so, perhaps you add an "AND" there so that it was:
AND(
{Phone 1} = "{{phone}}",
{Phone 1} != ""
)
And you'd update the code for Phone 2 and Phone 3 accordingly
Mar 18, 2024 08:49 PM
Yes! This is it. Obvious now that it's here in front of me. Thank you so much for your suggestion!