Subject Re: Gridcolumnindexchange.cc
From Gaetano D. <gaetanoddRemoveThis@andThatHotmail.com>
Date Mon, 31 May 2021 14:23:13 +1000
Newsgroups dbase.getting-started

On 31/05/2021 12:37, roy price wrote:
> Hello again,
> I'm wondering if the indexes of a table that GridColumnIndexChange.cc
> uses, can use an expression for 2 fields, so that if the selected
> column (if the first indexed field has the same data in multiple
> records), would also sort the second field contained in the index
> expression.
> IE, if the first field contains a location, the second field would
> arrange items within that location.
>
> I've tried to do it and failed.
> Regards
> Roy Price
>
I think that if you create a complex index using the primary and
secondary fields and give it the name of the primary field, it should
work because the code looks for an indexname that matches the field
name, it doesn't check if the index if on one field or two fields
combined. Naturally this implies that a simple index on that same field
name cannot exist in the same table, so if you need an index on that
field alone too, you need to create another complex index on that field
name only and give it another name than the field name.

This is all done in table design mode, then go to the Menu
"Structure-Manage indexes"

--
Gaetano.