4D v16.3

QUERY SELECTION

Home

 
4D v16.3
QUERY SELECTION

QUERY SELECTION 


 

QUERY SELECTION ( {aTable }{;}{ queryArgument {; *}} ) 
Parameter Type   Description
aTable  Table in Table for which to return a selection of records, or Default table, if omitted
queryArgument  Expression in Query argument
Operator in Continue query flag

QUERY SELECTION looks for records in aTable.The QUERY SELECTION command changes the current selection of table for the current process and makes the first record of the new selection the current record.

QUERY SELECTION works and performs the same actions as QUERY. The difference between the two commands is the scope of the query:

  • QUERY looks for records among all the records in the table.
  • QUERY SELECTION looks for records among the records currently selected in the table.

For more information, see the description of the QUERY command.

The QUERY SELECTION command is useful when a query cannot be defined using a sequence of QUERY calls joined with the * parameter. Typically, it is the case when you want to query a current selection that does not result from a previous query, but from a command such as USE SET

Example  

You want to query the records that have been previously highlighted by the user in a list form. You can write:

 USE SET("UserSet") //replace the current selection with the highlighted records
 QUERY SELECTION([Company];[Company]City="New York City";*)
 QUERY SELECTION([Company]Type Business="Stock Exchange")

You will find all companies located in New York City, with a Stock Exchange activity, among the initial user selection.



See also 

QUERY

 
PROPERTIES 

Product: 4D
Theme: Queries
Number: 341

The OK variable is changed by the commandThis command modifies the LockedSet system setThis command changes the currrent recordThe command changes the current selectionThis command can be run in preemptive processes

 
HISTORY 

Modified: 4D v6.5

 
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)