Function handleDefinedFields