Determine first and last record within a collection with a formula


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:

  1. [prdr_prbv.first(prbv_volgorde).prbv_num]
    • sort ascending by prbv_volgorde
    • the first record of this
  2. [prdr_prbv.last(prbv_volgorde).prbv_num]
    • sort ascending by prbv_volgorde
    • the last record of this
  3. [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
  4. [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
  5. [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
  6. [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
  7. [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

  • Published:5 jan 2023 08:00
  • Latest update:5 jan 2023 08:00
  • TypeRelease notes
  • FunctionalityVERBETERD
  • Category
  • Product
  • Version
    005.067.008
  • Availability
    Openbaar