### Title

Calculation Field option - blank if a referenced field is blank

### Post

Can I / How do I prevent a calculation field from performing a calculation until all referenced fields are filled in? E.g. Date Out - Date In to calculate how many days in shop. I don't need the calculation until the Date Out field is filled in, but the calculation field shows a long negative number.

You get that long negative number because date fields are really specialized number fields that count the number of days from 12/31/0000. Thus you are subtracting a large number of days from a blank value--which FileMaker treats as a zero in most cases.

You can use IsEmpty with an If or Case function to test to see if fields are empty and to only return a value if they are not. If you need to test multiple fields, you can use the and operator:

If ( Not IsEmpty ( Date In ) AND Not IsEmpty ( Date Out ) ; Date Out - Date In )

Edit note: Changed "specialized date" to "Specialized number".