QUERY WITH ARRAY

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.5


QUERY WITH ARRAY (indexedField; array)

ParameterTypeDescription
indexedFieldFieldIndexed field used to compare the values
arrayArrayArray of the searched values

Description

The QUERY WITH ARRAY command searches all the records for which the value of indexedField is equal, at least, to one of the values of the elements in array. The records found will become the new current selection.

This command allows you to quickly and simply build a search on multiple values.

Notes:

This command only works with indexed fields. It cannot be used with fields of type Text, Picture, Subfield, or BLOB.

indexedField and array must be of the same data type. Exception: you can use a Longint array with a field of the Time type.

Example

The following example allows you to retrieve the records of both French and American clients:

   ARRAY STRING (2;SearchArray;2)
   SearchArray{1}:="FR"
   SearchArray{2}:="US"
   QUERY WITH ARRAY ([Clients]Country;SearchArray)

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next