| Subject |
Re: Gridcolumnindexchange.cc |
| From |
roy price <royprice@royprice.name> |
| Date |
Mon, 31 May 2021 20:35:33 +1000 |
| Newsgroups |
dbase.getting-started |
On 31/05/2021 2:23 pm, Gaetano D. wrote:
> 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"
>
Well that worked now. The clue was in the name of the index, as when it
didn't work before, I had an index name that was not the same as the
fieldname.
Thanks Gaetano.
|
|