0

Display last 3 records in a table

I would like to display the last three records in a linked table that containes , among other things, dates, actions and task owner. I have figured out how to use the last() function, and can show the last record, but would like to show the two records before the last one as well. Any suggestions?

3 replies

null
    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    If the reference to the linked table is called "LinkedTable", and if you need to show the three last records when sorted by a field called "Date", create a view and populate it by putting this script in the Formula of the view:

    let d := (LinkedTable order by Date);
    let c := cnt(d);
    slice(d, max(0, c - 3), c)

    • Anders
    • 3 yrs ago
    • Reported - view

    Thanks for your help with this. Was able to get it to work. Layout is not great, would have preferred it looking like a table rather than as separate fields, but it gets the job done for us. Thanks again.

    3 actions

    • John_Halls
    • 3 yrs ago
    • Reported - view

    Hi

    I've just tested this out of interest and I can confirm that if you follow Alain's instructions it will give you a table exactly as you want. It's an imprssive solution from Alain.

    Regards

    John

Content aside

  • 3 yrs agoLast active
  • 3Replies
  • 660Views