Skip to main content
Version: Next

QUERY SELECTION BY ATTRIBUTE

QUERY SELECTION BY ATTRIBUTE ( {aTable}{;}{conjOp ;} objectField ; attributePath ; queryOp ; value {; *} )

ParameterTypeDescription
aTableTable🡒Table for which to return a selection of records, or Default table if omitted
conjOpOperator🡒Conjunction operator to use to join multiple queries (if any)
objectFieldField🡒Object field to query attributes
attributePathString🡒Name or path of attribute
queryOpOperator, String🡒Query operator (comparator)
valueText, Number, Date, Time🡒Value to compare
*Operator🡒Continue query flag

Description

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