4D v16.3

QUERY WITH ARRAY

Home

 
4D v16.3
QUERY WITH ARRAY

QUERY WITH ARRAY 


 

QUERY WITH ARRAY ( targetField ; array ) 
Parameter Type   Description
targetField  Field in Field used to compare the values
array  Array in Array of the searched values

The QUERY WITH ARRAY command searches all the records for which the value of targetField 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 cannot be used with fields of the Picture or BLOB type.
  • targetField 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)



See also 

QUERY SELECTION WITH ARRAY

 
PROPERTIES 

Product: 4D
Theme: Queries
Number: 644

The command changes the current selectionThis command can be run in preemptive processes

 
HISTORY 

Modified: 4D v11 SQL

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)