Making type fields sortable