Help

Function for incoming and outgoing Orders [Solved]

1619 2
cancel
Showing results for 
Search instead for 
Did you mean: 
fabian_muhlber1
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello community,

i want to create a base that controlls orders. I have one table for “order positions” and one for orders. In the orders table i have a column for In/Out. Im looking for a funktion that adds or subtrakts the amount of items in storage based on “In/Out” column so i only need to use positive numbers.
I was looking through the funktions but dont know what do use. i was thinking about the replace funktion with an if statement and multiplay by the amount. like IF( “In” =1), IF(“Out” = -1) * Amount.
I know this code isnt correkt but i have no clue how to do it.

Edit: Problem partially solved by IF({IN/OUT} = “OUT”, -1) * Amount, but i donkt know how to make an ELSE statement

Best
Fabian

2 Replies 2

The syntax is IF(Condition, Do, ElseDo), so:

IF(Type = 'In', 1, -1)

Link: https://support.airtable.com/hc/en-us/articles/203255215-Formula-field-reference#logical

Thank you for your reply.
i have done it that way :slightly_smiling_face: