Sort by Posting Date in Descending Order

couberpu
couberpu Member Posts: 317
Hi,

I am working on a new form design to help sales person check customers' last posted orders. The table is 112, Sales Invoice Header, and I have three different No. Series posted into this table, SIXXXXX, SPXXXXX and SOXXXXX. I tried to use (Sell-to Customer No.,Order Date) to sort in desecnding order, so most recent orders will appear on top of the list. The problem is the primary key "No." always come into play so the result set will group by "No." then by Sell-to Customer No. then Order Date. What I really need is only in Date descending order.

Please help!

Thanks,
CouberPu

Comments

  • Savatage
    Savatage Member Posts: 7,142
    You can always add a new key "Posting Date" only.
  • couberpu
    couberpu Member Posts: 317
    edited 2007-02-19
    Hi Harry,

    Is "Posting Date" a good key? I though that the primary key "No." always be part of 2nd key!

    Thanks,
    CouberPu
  • Savatage
    Savatage Member Posts: 7,142
    couberpu wrote:
    Hi Harry,

    Is "Posting Date" a good key?

    Thanks,
    CouberPu

    It's actually not much different from using the No. Field. Obviously the smaller the Inv no the older the inv and same goes with the Posting date if you want to think about that.

    But we have Posting date on our Sale Inv Header Table.
    I though that the primary key "No." always be part of 2nd key!
    If that was the case I'd never sort anything easily :lol:
    See Pic
    http://savatage99.googlepages.com/SalesInvKeys.JPG

    Have you looked at form 302
    It posts the last entries for a number of transactions:
    Last Payment
    Last Invoice
    Last Credit Memo
    Last Refund
    Last Reminder
    Last Finance Charge Memo

    Or maybe it can be useful in what you are trying to do. <edit bad grammer>
    Try adding Last:
    SIXXXXX Order
    SPXXXXX Order
    SOXXXXX Order

    for exmaple