# AirTable module formula error

**URL:** <https://community.make.com/t/airtable-module-formula-error/56066>\
**Category:** Questions\
**Tags:** error, airtable\
**Created:** [September 25, 2024, 2:25pm UTC](https://community.make.com/t/airtable-module-formula-error/56066 "2024-09-25T14:25:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AverageGatsby](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/averagegatsby/32/49060_2.png) [@AverageGatsby](https://community.make.com/u/AverageGatsby)\
**Post date:** [September 25, 2024, 2:25pm UTC](https://community.make.com/t/airtable-module-formula-error/56066/1 "2024-09-25T14:25:40Z")

</div>

### What are you trying to achieve?

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?

### Screenshots: scenario setup, module configuration, errors

 ![airtable configuration.png](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/7/871caa193bf419bb01b33aafda92ede2f6e3c0c8.jpeg)  
 ![error.png](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/b/fba0e7b66bd8f15f5e362aca7e2da437361c7d62.png)

---

<div class="post-metadata">

**Author:** ![GIGO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/gigo/32/50192_2.png) [@GIGO](https://community.make.com/u/GIGO)\
**Post date:** [September 25, 2024, 3:48pm UTC](https://community.make.com/t/airtable-module-formula-error/56066/2 "2024-09-25T15:48:21Z")

</div>

Hey Jake

Out on a limb here, so take this advice with a grain of salt.

From what I can read in Airtable’s documentation, you need to create formulas in the table.

> **[Airtable Web API - Using filterByFormula or sort parameters](https://support.airtable.com/docs/airtable-web-api-using-filterbyformula-or-sort-parameters)**
>
> Learn how to filter or sort the results of an API response.

I am unsure if your directly able to filter on fields like you do.  
Maybe just test the filter with something like:

{email} = “[t5@gmail.com](mailto:t5@gmail.com)”

To check if that works.

Hope it helps.

/Riko

---

<div class="post-metadata">

**Author:** ![GIGO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/gigo/32/50192_2.png) [@GIGO](https://community.make.com/u/GIGO)\
**Post date:** [September 25, 2024, 3:53pm UTC](https://community.make.com/t/airtable-module-formula-error/56066/3 "2024-09-25T15:53:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![AverageGatsby](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/averagegatsby/32/49060_2.png) [@AverageGatsby](https://community.make.com/u/AverageGatsby)\
**Post date:** [September 25, 2024, 4:58pm UTC](https://community.make.com/t/airtable-module-formula-error/56066/4 "2024-09-25T16:58:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sam\_Krausz](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Sam\_Krausz](https://community.make.com/u/Sam_Krausz)\
**Post date:** [September 25, 2024, 9:52pm UTC](https://community.make.com/t/airtable-module-formula-error/56066/5 "2024-09-25T21:52:42Z")

</div>

Try this.

AND(  
{Email} = “1. email”,  
IS\_BEFORE({Expiry}, NOW()),  
{Credits} \> 0  
)

---

<div class="post-metadata">

**Author:** ![AverageGatsby](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/averagegatsby/32/49060_2.png) [@AverageGatsby](https://community.make.com/u/AverageGatsby)\
**Post date:** [September 26, 2024, 12:28am UTC](https://community.make.com/t/airtable-module-formula-error/56066/6 "2024-09-26T00:28:40Z")

</div>

🤦‍♂️

A few of things:

1. I was referencing the field as “{Email}” when I actually needed to reference it as “{Email} (from Customers)” as it’s a lookup field.
2. 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.
3. Expiry date should be greater than current date. (Wouldn’t explain why the formula wasn’t working but a logic error nonetheless)

So the actual formula should be:

AND(  
{Email (from Customers)} = “[t5@gmail.com](mailto:t5@gmail.com)”, //hardcoded for testing  
{Expiry} \> now(),  
{Credits} \> 0  
)

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [October 10, 2024, 12:37am UTC](https://community.make.com/t/airtable-module-formula-error/56066/7 "2024-10-10T00:37:20Z")

</div>


