You use array notations to filter a set of data so that the script can retrieve a particular value or subset of values. You specify the required value or values by placing square brackets around the filter.
If multiple records exist for the same business object, you must specify the particular record for the script to retrieve. You specify the index of the record between the square brackets that represent an array.
A script must retrieve the quantity declared on the distributed costs of a purchase order for a single PO line. The relationship expression uses an array filter:
POLINE[3].POCOST[4].quantity
Retrieving values by using an array index uses business objects and sets of business objects already loaded into the memory by the business application. Using an array index is therefore in memory filtering.
If multiple records have the same business object, you specify the particular record or subset of records that the script must retrieve. You specify a WHERE clause between the square brackets that represent an array.
A script must retrieve the quantity declared on the distributed costs of a purchase order for a subset of PO lines. The relationship expression uses a filter:
POLINE[linecost>100].POCOST[percentage<100].quantity
The WHERE clause is appended to the existing relationship WHERE clause that is pre defined in the data dictionary for the POLINE relationship. Retrieving values by using the WHERE clause filter retrieves data from the database. The values are accessed by the script by applying the complete WHERE clause to the target table or view that the business object represents. This type of filtering involves more processing than retrieving values by index or by condition.
If multiple records have the same business object, you specify the record or subset of records that the script must retrieve. You specify a condition between the square brackets that represent an array.
A script must retrieve a quantity declared on the distributed costs of a purchase order for a subset of PO lines. The relationship expression uses a filter:
POLINE[linecost>100].POCOST[cond: PERCENTCOND].quantity
The condition PERCENTCOND is a condition expression configuration defined with Conditional Expression Manager. You define the configuration before using it in the relationship path. When specifying the condition in the relationship path, ensure that the condition is preceded by the keyword cond and the colon. Unlike a filter with a WHERE clause, retrieving values with the condition filter is done in memory.