Subject Re: lookupSql and applylocate
From Dirk <non@non.com>
Date Fri, 20 Jan 2023 11:13:48 +0100
Newsgroups dbase.getting-started

Op 19/01/2023 om 15:12 schreef Mervyn Bick:
> On 2023/01/19 00:05, Dirk wrote:
>> Dear all,
>>
>> i use a sql with lookupsql working well
>>
>>   sorting no probleme
>>
>> when i sorted i want to find the row needed, with field not based on a
>> lookupsql no problem
>>
>> when i want to search a row with a field based on lookupsql i have to
>> put the value of this row
>
> I'm afraid you can't use locateApply() on a field that uses lookupSQL.
>
> What you can try is to JOIN the lookup table to the main table.  This
> makes the rowset read-only and it will change the order of the records.
> You can, however, add an ORDER BY clause to the SELECT statement to
> correct this.  You should now be able to use applyLocate() to find the
> first record that matches your search value.
>
> Mervyn.
>
  thanks for advice,

i already was trying with lookupRowset, but once you need the 3th fields
and more you get error,

Dirk,