Subject Re: [IBO] Column orderding
Author Paul Vinkenoog
Hi Rob,

>> I load OrderingItems with the appropriate order using this code ...
>> sFieldName + '=' + sFieldName + '; ASC '

That's not the exact syntax. You only use ';' if you want to add a
second ordering (typically a descending one), e.g.:

Name of the Dog=DOGNAME;DOGNAME DESC

Note that you can freely choose the OrderingItem's "name", that is:
the part before the '='. It can be equal to the field name but it
doesn't have to be.

In the above example, supposing that this is the third line in your
OrderingItems, set OrderingItemNo to 3 to order the set by DOGNAME
(ascending), or set it to -3 to order by DOGNAME descending.

Helen:

> I don't know of any way to access the ORDER BY <degree-number>
> syntax for expression columns via an OrderingItem, which would be
> the only way to order a set by such a column.

Simply like this:

Puppy count=4;4 DESC
Daily growth average=7;7 DESC

or even
MyCompositeOrdering=4, DOGNAME, 7;4 DESC, DOGNAME DESC,7 DESC

for a multi-column ordering.

I've done this often, since you can't use column aliases in
OrderingItems.


Greetings,
Paul Vinkenoog