6/29/93
Hieu,
You can sort a field inside MetaCard using the MetaCard "sort" command,
but you can't sort by your second "field" (actually MetaCard would call it
an item).
If you don't want to write the field to a UNIX file and use UNIX sort, you
can use a more complicated approach, but it works entirely inside
MetaCard. Use the itemDelimiter property as suggested to define items on
each line in your field.
Then, with a repeat structure, line by line, assign each item in that line
to a variable and then put those items in sort key order in another field,
such as, field "temp". For example, you have 3 items on each line, and
you want to sort first by item2, then by item3 and then by item1. Move
those items to the same line in field "temp" but so the original items are
in the following order in field "temp": item2, item3, item1. Now sort
field "temp" and then reverse the item switching process when you return
the items to your original field. (Actually you wouldn't need to use a
different field, but it's safer.)
No, this is not as straight forward as using the UNIX sort, but it does
work.
-- Sincerely,Clark Parsons Learning Products Engineer Hewlett-Packard Company Fort Collins, Colorado USA clarkp@fc.hp.com