Subject Re: lookupSql and applylocate
From Mervyn Bick <invalid@invalid.invalid>
Date Thu, 19 Jan 2023 16:12:31 +0200
Newsgroups dbase.getting-started

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.