Adding error message for no records to sort