Try to do a filter and after that a find a value outside the fitler. ________________________________ De : Martin Schreiber <mse00...@gmail.com> Envoyé : mardi 18 septembre 2018 16:06 À : mseide-msegui-talk@lists.sourceforge.net 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
_______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk