Sorting Records

I am finally getting some time to start using Pan X. One of the issues I have and I believe has always been the case, is that when you do a sort on a subgroup, the remainder of the database also gets sorted the same way.

Here is my scenario. I have track times that sort up from fastest to slowest. I have field times that need to sort down from longest distance to shortest distance. So, you can see my problem. I have worked around this by doing one sort, creating a numeric field and doing a sequence and then doing the same with the second sort. Then I do a sort using the sequence field.

I don’t understand why one is not able to do a sort only on a subgroup. Or am I missing something?

There is no such thing as “sort on a subgroup”. I’m not even sure what that means?

Well, obviously the database can’t be sorted in two different orders at once.

You can do a “sort within”. In that case the second field is only sorted within each group of the first sort. For example, you could sort by a State field, and then do a sort within by the City field. The states would still be in order, with the cities sorted within each state. Is that what you mean? If so, Panorama has let you do that since 1988 (version 1.0). Panorama X still can do that, and also has the Sort dialog that allows you to specify multiple fields to be sorted all at once.

All of this is explained in the Panorama X help under Sorting Data, with little movies to illustrate exactly how it works.

I did not explain myself correctly.

I am sorting on the same field, but within that field are what I call erroneously “sub group”. Using your example I would look at cities from A-M and sort up, then select cities within the same field with names from N-Z and sort down. It doesn’t seem possible to have cities A-M be sorted up and then when I just select within the cities N-Z to have them sort down. Not sure if that makes it any clearer.

Suppose you had a field of numbers.

5
12
17
9
4
2
13

and now you select the even numbers and sort up. When you select, the odd numbers aren’t visible anymore, but they still occupy the same position in the database. 17 and 9 are still between 12 and 4. So now you sort up. Where should 17 and 9 be now, with respect to 12 and 4?

As you know Pete, I used to have a very similar database, and I used the same method for getting track and field performances in order from best to worst, but here is an alternate way of doing that.

You could have one field for track times, and another for field heights or distances. The times field would be sorted up. The distances field would be sorted down. With the database grouped by event, field events wouldn’t change their order when you sorted by time, and track events wouldn’t change their order when you sorted by distance.

Dave: Very good idea. I probably used some of your code in the past. I
did do the extra field and use sequence. Just thought it was strange
that the sorting did all the records, rather than just those selected.
I am getting my rusty brain back to work again. Spent the last year
learning web design using Rapidweaver, so this year it is Panorama. At
almost 72 I have to keep those little brain muscles moving…:slight_smile:

When you do a selection, the records that aren’t selected aren’t removed from the database, they are just temporarily invisible. It’s not as if the selected records are moved to some separate spot where they can be manipulated differently.

I think you are imagining sorting paper items, where you could make a selection by moving papers into a separate box, then making another selection by moving other papers into a separate box. Then each box could be sorted separately. But Panorama doesn’t work that way. When you make a selection, all you are doing is making the unselected records invisible. But both the selected and unselected records are still altogether in the same “box”.