distinct filter in forms

bullbull Member Posts: 20
hello all ,

I have a issue that i can't solve , so i believe that this is the right place to post my problem.

I have a form and i want to display on it records from table 32 ( item ledger entry ) . Where is the problem? ...example :

records in table 32 :

Entry No
Entry Type
Document No
1
Positive Adjmt.
1
2
Positive Adjmt.
1
3
Positive Adjmt.
1
4
Positive Adjmt.
2
5
Positive Adjmt.
2

In my form i want to display :

Entry Type
Document No
Positive Adjmt.
1
Positive Adjmt.
2

I thought that first of all i want a filter for Entry Type . It was easy and it worked . But secondly i want a distinct filter for Document No. , because i dont want to display it 3 or more times , but only once .

Is there any way to do it ??? :?
Thanks in advance

Comments

  • kinekine Member Posts: 12,562
    It cannot be done without modification and usage of C/AL code.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,305
    NAV does not know about DISTINCT. You'll have to develop some sort of logic to fill a temporary list when the form opens.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    If it's NAV5 then with SourceTableIsTemporary property you can write code in OnOpenForm to populate the temp table (which is referred as Rec) with the distinct records.
Sign In or Register to comment.