How to predefine a field and use it for calculation