Set sort headers from sort fields in db