Help

Re: Multiple IF conditions in automations instead of IF > ELIF > ELIF > ...

1292 0
cancel
Showing results for 
Search instead for 
Did you mean: 
qoob
5 - Automation Enthusiast
5 - Automation Enthusiast

My goal is to create a single automation, that checks multiple separate fields and if they contain values, process separate actions.

For example, if a new record is created and there are values in the field weight, then update the weight field of the linked record. If a new record is created and there are values in the location field, then update the location field of the linked record.

Now the statements follow an IF -> ELIF (Otherwise if) logic, therefore if a new record is created and both fields (Weight and location) are not empty, only the first condition is fulfilled and the automation stops. In this case the weight would be updated (matching the first IF condition), but the location would not (because the first condition was fulfilled).

My workaround for this has been creating first a field that checks
IF weight AND location have values, update both,
ELIF weight has values, update weight
ELIF location has values, update location

However this does not scale very well if I want to check many fields. I would have to create a conditional statement for every possible combination. I also don't want to create separate automations for every single field - it would be neater in my opinion to have them all in one automation which would be possible if I was able to use IF -> THEN -> IF -> THEN type of logic.

The reason I want to check each field separately is that I don't want to overwrite fields that have not been updated. If the user has not made a change in weight, I don't want to overwrite the weight field of the linked record with null. This is why I need a conditional action.

2 Replies 2

This isn’t currently possible with Airtable native conditions. You could do it with a custom script or a third party automation service. 

Yannick_Burky1
5 - Automation Enthusiast
5 - Automation Enthusiast

+1