Why, Thank You, Martin.
I wonder if you could expand upon this to set up the field order as variables selected from a browser popup. It could be a really neat re-deployable bit of code.
I am waiting on approval of a job with some complex dynamic sorting options required. I think what you have defined here will be a good starting point.