Set the query when the user did select.