How to use contextual filters to a View for use as a sort criteria?
I am not sure how this translates to Drupal 7 and Views 3, but I have done the following with Drupal 6 and Views 2 using hook_views_query_alter

function mymodule_views_query_alter (&amp;$view, &amp;$query)
{
    if ($_GET["sort"]) {
        $sort = check_plain(trim(strtolower($_GET["sort"])));

        switch ($sort) {
            case "title":
                $query-&gt;orderby = array("node.title ASC");
                break;
            case "order":
                $query-&gt;orderby = array("node.nid DESC");
                break;
            case "somefield":
                $query-&gt;orderby = array("node_data_field_somefield_field_somefield_value ASC");
                break;
        }
    }
}


The trick is to make the views w/ the sorts, and look at the SQL, and use this to update your code.