PICK FROM
This action is similar to the FIND action in that it finds particular instances of a business object, but unlike the FIND action, it displays the instances found on the screen and waits for the user to pick a particular instance. The syntax of the action is almost exactly the same as that of the FIND action except that the PICK FROM keyword is used instead of FIND. For example,
PICK FROM Account WHERE Account.State = 'OPEN' ORDER BY Account.Balance
IN BATCHES OFkeyword that can be used in theFINDaction is not applicable to thePICK FROMaction.- By default the action will display a screen that allows selecting only one object. If multiple selection is required use the
PICK ONE OR MORE FROMkeyword instead ofPICK FROM, for example,PICK ONE OR MORE FROM Account WHERE Account.State = 'OPEN' ORDER BY Account.Balance
- By default if a query finds just one instance of the object this instance will be displayed on the screen and the user will have to select it as usual. If you do not want the action to prompt for the single found instance, but use this instance straight away add
NO CONFIRMATION FOR ONEkeyword at the end of the action. For example,PICK FROM Account WHERE Account.State = 'OPEN' ORDER BY Account.Balance NO CONFIRMATION FOR ONE
- The
USINGkeyword can be used when query condition is specified explicitly but display settings of an existing query can be used. For example,PICK FROM Account WHERE Account.State = 'OPEN' ORDER BY Account.Balance USING 'Some existing query'
Here 'Some existing query' is the name of the query which display settings will be used to display query results.
Syntax
PICK [ ONE | ONE OR MORE ] FROM ( ALL Id() | Id() WHERE RuleCondition() | StringLiteral() | Id() ) [ ORDER BY AttributeIdentifier() [ ASC | DESC ] ( , AttributeIdentifier() [ ASC | DESC ] )* ] [ TAKE BEST ( INTEGER_LITERAL | AttributeIdentifier() ) ] [ LIMIT ArithmeticExpression() , ArithmeticExpression() ] [ NO CONFIRMATION FOR ONE ] [ USING StringLiteral() ]
Example
PICK FROM Account WHERE Account.State = 'OPEN' ORDER BY Account.Balance