|
It is now possible to use a formula to determine the first or last record within a collection based on one or more fields that you can sort on. With a minus sign in the formula, the field is sorted in descending order.
Examples to show a certain operation PreC on a production order subassembly:
- [prdr_prbv.first(prbv_volgorde).prbv_num]
- sort ascending by prbv_volgorde
- the first record of this
- [prdr_prbv.last(prbv_volgorde).prbv_num]
- sort ascending by prbv_volgorde
- the last record of this
- [prdr_prbv.last(prbv_volgorde,bwrk_num).prbv_num]
- sort ascending by prbv_volgorde
- sort in ascending order by bwrknum
- the last record of this
- [prdr_prbv.last(prbv_volgorde,-bwrk_num).prbv_num]
- sort ascending by prbv_volgorde
- sort in descending order by bwrk_num
- the last record of this
- [prdr_prbv.where(prbv_uitbesteden=true).first(prbv_volgorde).prbv_num]
- filter by prbv_uitbesteden=true
- sort ascending by prbv_volgorde
- the first record of this
- [prdr_prbv.last(prbv_tijd_per_stuk,prbv_instel_tijd).prbv_num]
- sort ascending by prbv_tijd_per_stuk
- sort in ascending order by prbv_instel_tijd
- the last record of this
- [prdr_prbv.first(-prbv_tijd_per_stuk,-prbv_instel_tijd).prbv_num]
- sort descending by prbv_tijd_per_stuk
- sort in descending order by prbv_instel_tijd
- the first record of this
|