Sorting is invalid if template number is specified in item query screen.