Set value when getting field type