FIRST
Specification | Value |
---|---|
Name | FIRST |
Description | Returns the first element in a list. |
Parameter 1 Name | list |
Parameter 1 Type | list of objects |
Parameter 2 Name | |
Parameter 2 Type | |
Parameter 3 Name | |
Parameter 3 Type | |
Return value | The first element in the list. |
Note
The criteria concerning which element is first may not meet your expectations.
If sorting matters to you, please use FIRST together with the SORT and ORDERBY operators.
Example:
Let's return the first met line of a document (sales order):
10: FIRST CHILD:Lines
Note
The repository of the attribute is Crm.Sales.SalesOrders
If you want to expand the example, you can sort the line in an ascending order by line number.
This way, the atrribute will return the line with lowest line number:
10: FIRST EXP:20
20: SORT CHILD:Lines ATTR:LineNo CONST:ASC