Page 1 of 1

locate with 2 fields doesn't work

Posted: Mon 09 Jun 2008 14:35
by johnkuiper
Normally I use only one key to locate a record.
Now I have to find a record with two fields.
This is what I use

Code: Select all

if Virtualtable.Locate('programma_id, lijstnummer',vararrayof([StrProgrid,IntLijstnr]),[])
This occurs an error, because the second field is not found. But the fields are created (seen with virtualtable.getfieldnames).

Is this a bug. Is there another way to find the record except the filter?

Posted: Tue 10 Jun 2008 07:14
by Antaeus
You should split fields in the field list with a semicolon, not with a comma:

Code: Select all

if Virtualtable.Locate('programma_id; lijstnummer',vararrayof([StrProgrid,IntLijstnr]),[]) 

Posted: Tue 10 Jun 2008 08:30
by jkuiper_them
Sorry :oops:

Normally I'm using one field to find.