Thanks a lot. Actually, I just got it using a slightly different method.
Right now I have two global fields (AscendField and DescendField), and two Unstored Calculations that GetField info from the Global Fields.
I'm using a multi-field sort on my portal (AscendCalc ascending, then DescendCalc descending). My script then clears out one global field, and puts the necessary Field Name in the other. Then it changes a separate SortToggle Field so it knows whether it's sorted ascending or descending and does the opposite each time you click the button.
But still... why does it have to be sorted by a calculation field? Shouldn't just telling the portal to sort by the global fields and changing the those fields with the script work?
Thanks for the help.