Did you look at the scripts performed when those buttons are clicked? (The column heads have been setup up as buttons).
I don't have that file at my fingertips, but I seem to recall that the scripts use a global variable to keep track of the current sort order so that if the current value in the global field is "ascending", it sorts in descending order and sets the variable to "descending". If the value is "descending" the opposite takes place.
Yes, what you say is correct. But what i can't figure out is this: How does the Script know which actual field/column to sort? Because, as i said earlier, the names of the script parameters and the global variables do not match up with the actual field name in the column to be sorted.
For example, the actual field name to be sorted is "NameFirst" ; the column label (that has the script attached) says "First Name" ; the script parameter says "firstname" ; and the global variable is called "$$Sort_CustomerFirstName" .
That's controlled by the If steps.
Each part of those steps has a different sort records step and each such step checks the value of the script parameter to determine which sort to perform.
Thank you. By going into each "Sort Records" step within each of the "IF" and "Else" steps, i see that THAT is where i make the change so it reflects which of my own fields i want it to sort.
The problem i have discovered is that my mind's eye was focusing on the changing script parameters (which is obviously important) and the global variable names, and i was completely glossing over having to look into each "Sort Records" step. Many thanks.