I have a webhook that receives an email address. I have two Airtable tables: Customers and Accounts. They have a one-to-one relationship and link fields have been setup correctly between the two.
In Accounts, I have the following fields:
Email (from Customers) - a lookup field
Expiry - a date field storing dates in DD/MM/YYYY format
Credits - a number field
I’m trying to Search for a Record using an Airtable module in Make where the email equals the email contained in the webhook, Expiry is less than today’s date and Credits is > 0.
Steps taken so far
I am using the attached formula but it returns an error - please see attached. What am I doing wrong?
Just saw something else, the error returns that email is an unknown field, is the field named differently in Airtables? Do Airtable us two names for coulmns (like a pretyfied human readable one) and a internal/raw one?
Thanks for your reply. All I can think of is that Email is a lookup field in my Accounts table. I don’t know if that makes any difference when trying to search for a record based on a lookup field.
I was referencing the field as “{Email}” when I actually needed to reference it as “{Email} (from Customers)” as it’s a lookup field.
There was no need to formatDate. Just using {Expiry} > now(), worked. (I found this surprising as now() does not appear as a function in the Airtable module date functions - but it worked.
Expiry date should be greater than current date. (Wouldn’t explain why the formula wasn’t working but a logic error nonetheless)