0

Sort selection of related records

Hello,

I have three tables:

1. invoice

2. InvoiceItems, these are linked to the invoice

3. cost center, these are linked to invoice items

When I go to the cost center record, I see the InvoiceItems that are linked to the cost center.

Now I would like to further evaluate these data records in a formula (and write them to a PDF), for this I have the following line in the formula:

let xSelRgPo := this.InvoiceItems;

This works fine.

But I would also like to sort the selection xSelRgPo according to the date of the invoices.

How can this work?

Everything I have tried does not produce the desired result.

Thank you very much for your help!

3 replies

null
    • Fred
    • 8 days ago
    • Reported - view

    try:

    let xSelRgPo := (this.InvoiceItems order by Date)

    If Date is the name of the fieldname. Otherwise change it match.

    • Fred
    • 8 days ago
    • Reported - view

    oops, assuming that you don't have a date field in invoiceitems, you want to sort by Invoice.Date:

    let xSelRgPo := (InvoiceItems order by Invoice.Date)

    Since Invoice is the 1 side, you can just point to it directly.

      • PetraTest
      • 7 days ago
      • Reported - view

       Perfect, thanks a lot!

Content aside

  • 7 days agoLast active
  • 3Replies
  • 29Views
  • 2 Following