Try to do a filter and then find a value outside the filter. ( using
navigator)
Ex
values = ( 10,20,30,40)
set filter to value > 20 values = ( 30,40) are listed
try find 20 20 is listed and the filter is off
Sample example is in mseuniverse/samples/db/dbfilterI . I will not want to
order you
or ask you for an immediate response.
Best Regards.
Med.
________________________________
De : Martin Schreiber <[email protected]>
Envoyé : mardi 18 septembre 2018 16:06
À : [email protected]
Objet : Re: [MSEide-MSEgui-talk] General list for MSEide+MSEgui
On Tuesday 18 September 2018 11:47:18 mohamed hamza wrote:
> The problem is on findvariant and when the field to search is not a
> string.
>
> Here what I did.
>
> VarVar is a variant;
>
> procedure tmainfo.beforeendfilteredit(const sender: tmsebufdataset;
> const akind: filtereditkindty);
> begin
> i:=0;
> with sender do begin
> while (i<fields.count) and (fields[i].isnull) do inc(i);
> if i<fields.count then varvar:=fields[i].value;
> end;end;
>
-> varvar has the value of the first not null field, i holds the field number.
Correct?
> procedure tmainfo.afterendfilteredit(const sender: tmsebufdataset;
> const akind: filtereditkindty);
> var j:integer;
> begin
> if akind = fek_find then begin
> j:=0;
> if not(varisempty(varvar) ) then
> with sender do begin
> while (j<indexlocal.count) and
> (fields[i].fieldname<>indexlocal[j].fields[0].fieldname) do inc(j);
j is the index of the first localindex where the first indexfield is the first
not null filter field.
> if (
> j< indexlocal.count ) and
> (not indexlocal[j].findvariant([varvar],false,true)) then
> showmessage('*** not found ***');
> end; end; end;
What is the problem? "findvariant([varvar],false,true)" works for me as
expected. Do you have local indices for all needed fields?
Martin
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk