How is email field and text field different? Why must I convert Airtable's Email field to string before comparing with another string?

Hi guys,

I’m connected to my Airtable database and pulling an email field into AppGyver. I want to compare that email field with what my user typed in my AppGyver input field.

Why do i need to convert my Airtable email field to text first?

In the GET schema, my Airtable email field is listed as type “email address”, but i thought email address fields are text fields too? in the sense any validation that an input is an email is done BEFORE that input is saved as a text field.

This works (converting pageVars.email to string) → COUNT(SELECT(data.Airtable_MMA_Users1, item.fields.Email==STRING(pageVars.email)))

This works (converting item.fields.email to string) → COUNT(SELECT(data.Airtable_MMA_Users1, STRING(item.fields.Email)==pageVars.email))

This does NOT work (no string conversions) → COUNT(SELECT(data.Airtable_MMA_Users1, item.fields.Email==pageVars.email))

image

For the “no string conversion“, do you get an error flagged in the formula window? Or does the code fail to work when you compare the two email addresses?

There are times when the formula window will show an error in what you have but if you save it and run it it works just fine.

My guess would be that AppGyver is comparing the two field types without regard for the fact that the fields are both strings. This means that appgyver might just be looking at the type first and saying that an email type does not equal a string type without regard for the fact that both are just strings :slight_smile: