3. Basic Expressions for TADB List Groups

Purpose

Test an item to see if it has a specified quantity of a certain part.

Assumptions

There is one List group (in the expression), defined as follows.

Parts

Attributes include quantity, id.

Query Expressions

1

Parts.quantity=’7’&Parts.id=’id1’

2

Parts(quantity=’7’&id=’id1’)

Expression 2 is better. It often saves typing and usually yields better performance.

The group part of the syntax has been omitted from the internal sub-expression because it has already been provided outside the parentheses.

Important: Expression 2 syntax is required in attribute list expressions. In TestItem/ListItems expressions, it is optional.

Where

Criteria

Is/are the:

quantity

List group attribute.

'7'

Number of parts expression is looking for.

id

List group attribute.

'id1'

Part name.

Query Expressions say:

Return True for items that have 7 id1 parts in their Parts group

Important: In this syntax no parentheses are allowed within the parentheses as shown in these examples. All other operators are allowed.

Note: Make sure you include enough criteria in expressions to make them meaningful.

For example, the following expression is valid.

Parts.quantity=’7’

However, the expression only determines if any part has a quantity of 7.

This does not tell you much.

More information

Order Execution Mgt. Query expression descriptions.