This produces one EVENT dataset from another, having sorted the events into either ascending or descending order by the value in one of the lists.