Page 1 of 1

Filter and Locate

Posted: Mon 07 Apr 2014 20:11
by FerCastro
Hello all

I am trying to use the locate method whith the following code:

VTPCon.Locate('ID_Emp;CCon', VarArrayOf(['nID_Emp;cClaveCon']), []);

But I can not locate the record. Is there something wrong?


---
I am trying to filter the same virtual table with the following code:

VTPCon.Filter := 'ID_Emp = ' + VTMov.FieldByName('ID_Emp').AsString;
VTPCon.Filtered := true;


---

Do am I missing something? Thanks and best regards!!

Re: Filter and Locate

Posted: Mon 07 Apr 2014 22:23
by FerCastro
Locate is orking fine, but the filter still doesn't works.

Any sugestion?

Regards!!

Re: Filter and Locate

Posted: Tue 08 Apr 2014 09:28
by AlexP
Hello,

Judging by the code

Code: Select all

VTPCon.Filter := 'ID_Emp = ' + VTMov.FieldByName('ID_Emp').AsString;
FNominaData.VTPeriodoConceptos.Filtered := true;
You are setting the filter value in the VTPCon table, and the Filtered parameter value - in the VTPeriodoConceptos table. Please make sure you are working with one and the same table

Re: Filter and Locate

Posted: Tue 08 Apr 2014 14:14
by FerCastro
Hello Alex!!

Working fine both procedures!

Thanks and best regards!!

Re: Filter and Locate

Posted: Wed 09 Apr 2014 07:43
by AlexP
You are welcome. Feel free to contact us if you have any further questions about VirtualTable.