Sort by two columns

On the Payment Journal, when the user clicks on "Suggest Vendor payments". I want to sort first by Description, and then each Document No. should be sorted from the lowest to the largest number as well. Just as follows

xm08bhzzy2af.png
I tried to SetCurrentKey(Description) but that would sort the description only.

Answers

  • sorenhinrupsorenhinrup Member Posts: 136
    What version is this for?
    Create a key on the table with the two fields.

    Then on the page update the dataset to sort on the new key
  • mustafaAlsoufimustafaAlsoufi Member Posts: 60
    Thank you @sorenhinrup for your response.
    Please find below the version I'm using
    5s12th92lued.png

    I created a new key with "Document No. and Description" in the "Gen. Journal Line" Table and I used "SetCurrentKey("Document No.", Description) (As the screenshot below), but again I'm having the same issue where "Document No." is created by order from 1000-1010, but on the other hand the Description is still not in order
    ahq9aect2k5c.png

    It seems that it's only taking into consideration the first key in "SetCurrentKey" and ignoring the second one
  • sorenhinrupsorenhinrup Member Posts: 136
    you need to sort your data before you get the record.
    It should be placed in "OnOpenPage"
Sign In or Register to comment.