4D v16.3

QUERY SELECTION BY ATTRIBUTE

Home

 
4D v16.3
QUERY SELECTION BY ATTRIBUTE

QUERY SELECTION BY ATTRIBUTE 


 

QUERY SELECTION BY ATTRIBUTE ( {aTable}{;}{conjOp ;} objectField ; attributePath ; queryOp ; value {; *} ) 
Parameter Type   Description
aTable  Table in Table for which to return a selection of records, or Default table if omitted
conjOp  Operator in Conjunction operator to use to join multiple queries (if any)
objectField  Field in Object field to query attributes
attributePath  String in Name or path of attribute
queryOp  Operator, String in Query operator (comparator)
value  Text, Number, Date, Time in Value to compare
Operator in Continue query flag

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

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

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

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

The QUERY SELECTION BY ATTRIBUTE command is useful when a query cannot be defined using a combination of QUERY BY ATTRIBUTE (and even QUERY) calls joined with the * parameter. Typically, this 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 find people with an age between 20 and 30, among the records that were previously highlighted by the user:

 USE SET("UserSet") //creates a new current selection
 QUERY SELECTION BY ATTRIBUTE([People];[People]OB_Info;"age";>;20;*)
 QUERY SELECTION BY ATTRIBUTE([People];&;[People]OB_Info;"age";<;30) //triggers the query



See also 

QUERY BY ATTRIBUTE

 
PROPERTIES 

Product: 4D
Theme: Queries
Number: 1424

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 

New
Created: 4D v16

 
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)