Help

Re: Error when evaluating conditional group: if Formula field = interger?

Solved
Jump to Solution
573 0
cancel
Showing results for 
Search instead for 
Did you mean: 
oreocereus
8 - Airtable Astronomer
8 - Airtable Astronomer

I have a conditional automation. 

One of the conditions is that the actions only run if Formula = 1.

oreocereus_0-1729536579169.png

 

However, airtable returns an error when this condition is included. The field is formatted as a number field. 

How do I get airtable to evaluate whether formula = 1? And why won't it do so in this set up. It seems fairly straightforward, so i'm surprise this is causing a problem. It's able to evaluate whether a formula = string.

1 Solution

Accepted Solutions

Hello,

I have tried to replicate what you do, and I have no problem when defining "Active Guilds" as a count field on a linked table. I can use it directly in the automation condition and it works.

Could you send some screen captures to better understand how the table you run the automation on is built.

Thank you

Pascal

See Solution in Thread

8 Replies 8
Alexey_Gusev
13 - Mars
13 - Mars

Hi,
To narrow a scope of possible reasons, try to add another formula field with {Active Guilds}=1 and check whether it's true

Alexey_Gusev_0-1729543289792.png

in my example, reason is a lack of decimal places.

Alexey_Gusev_1-1729543590323.png

 

 

Hello,

If, as Alexey suggests, your formula "Active Guilds" does not return an integer value (even if formated with no decimals), then you could define a formula on top of this one to round the value and get an interger:

Pascal_Gallais_0-1729598107968.png

You cant then use this rounded value in your automation.

Regards,

Pascal

 

I may be misunderstanding, because this field can only be an integer.

The set up:

Active Guilds Lookup field (this looks up a "count" field in another base)

Active Guilds field (this is the formula field - I created this because automations didn't have a way to interpret the lookup field as a number)

So, because this formula references a lookup which references a count field, the result can only be an integer.

When i check whether active guilds = 1 with another formula field, it is returned as "true"

So I think there is still something I'm not understanding about how airtable interprets numbers in formula fields.

But ultimately, what is the path forward for what I am trying to achieve witht his automation?

Hello,

I have tried to replicate what you do, and I have no problem when defining "Active Guilds" as a count field on a linked table. I can use it directly in the automation condition and it works.

Could you send some screen captures to better understand how the table you run the automation on is built.

Thank you

Pascal

Sure!

This is the base being referenced by the lookup field. It's a count field.

oreocereus_2-1729668039375.png

 


This is the base it runs in. Here's the lookup and the formula field that references the lookup.

oreocereus_0-1729667968886.png

oreocereus_1-1729667986248.png

 

These are the conditions on the automation

oreocereus_3-1729668089152.png

 

 

Thanks,

I understand better and i did reproduce the issue.

What you can try is to modify your field "Active guilds linked (beds)". Instead of a lookup, do a rollup with the default formula "SUM(values)". 

You should then be able to use it directly in the automation conditional statement.

Regards,

Pascal

Thanks! I did come up with 2 other solutions after posting, but yours is better (it reduces fields, which I prefer as it makes editing base design and troubleshooting simpler).

The other two solutions that worked were
1) Turning the active fields formula field, which references the active guilds lookup of the count field, into a string rather than a number field, and using "if active guilds contains '1' " in the automation

2) Turning the active guilds formula field into a "if active guilds look up=1, true()" and using "if active guilds = 1" in the automation

Tho we have found a work around, I wonder why does airtable automations not understand the number value of the formula field?