| Both sides previous revision Previous revision | |
| ref:a_f:a:find [2026/08/13 00:43] – ↷ Page moved from a_f:a:find to ref:a_f:a:find localdev | ref:a_f:a:find [2026/08/13 00:53] (current) – ↷ Links adapted because of a move operation localdev |
|---|
| - ''ORDER BY'' AttributeIdentifier() (''ASC'' | ''DESC'')\\ \\ If this construct is used after the FIND action, the instances found by the action will be sorted by the specified attribute in the specified order. AttributeIdentifier indicates the attribute of the business object on which the sorting will be performed. The ''ASC'' keyword indicates the //ascending order// and the ''DESC'' keyword indicates the //descending// order. For example,<code aim>FIND ALL Account ORDER BY Account.Balance </code> finds all accounts sorted by their balances in the ascending order. If ''ASC'' and ''DESC'' keywords are omitted the ASC keyword is implied. | - ''ORDER BY'' AttributeIdentifier() (''ASC'' | ''DESC'')\\ \\ If this construct is used after the FIND action, the instances found by the action will be sorted by the specified attribute in the specified order. AttributeIdentifier indicates the attribute of the business object on which the sorting will be performed. The ''ASC'' keyword indicates the //ascending order// and the ''DESC'' keyword indicates the //descending// order. For example,<code aim>FIND ALL Account ORDER BY Account.Balance </code> finds all accounts sorted by their balances in the ascending order. If ''ASC'' and ''DESC'' keywords are omitted the ASC keyword is implied. |
| - ''TAKE BEST'' (IntegerLiteral() | AttributeIdentifier())\\ \\ If this construct is used after the ''FIND'' action, only the specified number of business object instances which match the specified criteria, will be found by the action. Typically this construct is used together with the ''ORDER BY'' keyword. For example,<code aim>FIND ALL Account ORDER BY Account.Balance DESC TAKE BEST 5 </code>this action will find 5 accounts with the highest balance. | - ''TAKE BEST'' (IntegerLiteral() | AttributeIdentifier())\\ \\ If this construct is used after the ''FIND'' action, only the specified number of business object instances which match the specified criteria, will be found by the action. Typically this construct is used together with the ''ORDER BY'' keyword. For example,<code aim>FIND ALL Account ORDER BY Account.Balance DESC TAKE BEST 5 </code>this action will find 5 accounts with the highest balance. |
| - IN BATCHES OF IntegerLiteral()\\ \\ If the action is likely to find many instances of the business object (hundreds or even thousands) their processing may take a while. In this case it is better to perform processing of instances in smaller chunks (batches). After processing of each batch is finished the results will be immediately committed to the system and stored in the database. If the batch size is not specified the system will only commit the results once all the instances have been processed. For example:<code aim>FIND Account WHERE Account.State = 'OPEN' AND Account.Balance > 1000 ORDER BY Account.Balance IN BATCHES OF 5 </code> Perform some actions with found objects (The actions will be performed in batches of 5 objects)\\ \\ If ''IN BATCHES OF'' keyword is omitted the default batch size of 1000 is used. See also the “[[docs:2000_concepts:0800_data_processing:0200_rules_transactions:0200_batch_operations|Batch Operations]]” section. | - IN BATCHES OF IntegerLiteral()\\ \\ If the action is likely to find many instances of the business object (hundreds or even thousands) their processing may take a while. In this case it is better to perform processing of instances in smaller chunks (batches). After processing of each batch is finished the results will be immediately committed to the system and stored in the database. If the batch size is not specified the system will only commit the results once all the instances have been processed. For example:<code aim>FIND Account WHERE Account.State = 'OPEN' AND Account.Balance > 1000 ORDER BY Account.Balance IN BATCHES OF 5 </code> Perform some actions with found objects (The actions will be performed in batches of 5 objects)\\ \\ If ''IN BATCHES OF'' keyword is omitted the default batch size of 1000 is used. See also the “[[2000_concepts:0800_data_processing:0200_rules_transactions:0200_batch_operations|Batch Operations]]” section. |
| - ''LIMIT'' ArithmeticExpression() '','' ArithmeticExpression()\\ \\ If this construct is used after the ''FIND'' action, only the specified rows will be returned. The first parameter indicates the first row number to be returned (starting from 1) and the second parameter indicates the number of rows to be returned. For example:<code aim>FIND Account WHERE Account.State = 'OPEN' AND Account.Balance > 1000 LIMIT 20,3 </code>This will return 3 rows starting from row 20. | - ''LIMIT'' ArithmeticExpression() '','' ArithmeticExpression()\\ \\ If this construct is used after the ''FIND'' action, only the specified rows will be returned. The first parameter indicates the first row number to be returned (starting from 1) and the second parameter indicates the number of rows to be returned. For example:<code aim>FIND Account WHERE Account.State = 'OPEN' AND Account.Balance > 1000 LIMIT 20,3 </code>This will return 3 rows starting from row 20. |
| |