"Adds 1 or subtracts 1"
To or from what value?
How should the transaction code affect how this calculation evaluate?
The transaction code tells me if I need to add 1 to "current inventory" or subtract 1 from "current inventory".
Here's the calculation that does what you describe, but I doubt it will produce the result you want in your database:
Define this calculation as a different field from current inventory:
Case ( TransactionCode = "Add" ; Currentinventory + 1 ; CurrentInventory - 1)
I believe that you are trying to update the currentInventory total by adding/removing one item from inventory and that would require a different approach. You might want to put the words "inventory ledger" into the search the forum box at the top of this screen to find some discussions of an approach for computing current inventory from a transactions ledger.