I'm trying to automate a calculation for a packing list template in Filemaker Pro 3.0, that enters the remaining amount into a field if the Subtotal is less than the minimum order. I've designed a script, but I don't want to have to remember to press a button first, and I don't know how to "call" the script with a calculation field.

Here's an example:

Subtotal: $7.00 {the minimum order is $12.00}
Sales tax:0.58
Shipping: 6.00
Other costs:
TOTAL:

The calculation/script should be:
if Subtotal <Minimum order,(Minimum order-Subtotal)+tax rate%
Go to Other costs field
Paste answer into Other costs
Show message: "Minimum order is $12; add other costs as needed"
The above message isn't required, but would be nice
endif

How can I get the above to automatically calculate? Thanks.