Sorting in Form

logu_cbelogu_cbe Member Posts: 54
Hi guys,

Just i would like to show in form like this

Date Line No. Comment
08/20/08 40000 Test Comment 4
08/20/08 50000 Test Comment 5
08/19/08 10000 Test Comment 1
08/19/08 20000 Test Comment 2
08/19/08 30000 Test Comment 3

In breif, we would like to Sort Decending by date and Acending by Line No.

How it can be achieved while sowing the above records in line form?

Thanks in Advance,
Loganathan S

Comments

  • MalajloMalajlo Member Posts: 294
    Use code on cotrols on form. Like:
    Serial No. - OnActivate()
    SETCURRENTKEY("Serial No.") ;
    CurrForm.UPDATE(FALSE) ;
    
  • logu_cbelogu_cbe Member Posts: 54
    I could not follow you :x

    Can you please explain it?

    Thanks,
    Logu
  • SavatageSavatage Member Posts: 7,142
    do you have a date & line no. key?

    check the SourceTableView assitedit - for you sort choices
  • logu_cbelogu_cbe Member Posts: 54
    I am having key;

    But there is a need for Ascending Order sort by Line Number and Decending Order sort by Date.

    Is is fesible in line form?

    Thanks,
    Logu
  • MBergerMBerger Member Posts: 413
    it IS possible, if you can invert the order of the date.
    - In the table in question, make a field of type BigInteger ( let's call it "sortfield" for now )
    - through code ( onInsert, onModify, or the fields OnValidate ) make sure it contains 0dt - date. you might have to make a report to fill this for existing records.
    - Make a key "Sortfield","Line no.", and you'll have your desired sorting order
Sign In or Register to comment.