How to apply table filter

kavin6kavin6 Member Posts: 15
Dear All,


Guide me, Suppose there are 2 tables A, B . both have Entry No fields. I need to show Entry no from Table A which are not in B table. How to apply this table filter.

thanks,

Kavin

Comments

  • TonyHTonyH Member Posts: 223
    How would you like to show it? Report, Form?

    And why would you have identical Entries in two different tables? Sounds like a non-normalized situation to me.

    Could you perhaps elaborate to the requirements?


    T
  • kavin6kavin6 Member Posts: 15
    I need to show that in form as help window to user. My actual requirement is I need to show invoice nos made for items with tracking serial nos. after that we will do some calculation and store the invoice no in my table. next time i need not to show the invoice no which is stored in my table. one table created by me and other table which i use is item ledger entry table.

    in both the tables that invoice no is not the primary key field.

    suggest me how to apply the filter.
  • kinekine Member Posts: 12,562
    1) You can define some FlowField which will use the "Exists" function to find out if the record with the selected no. exists in another table. You can than filter on this field

    2) Be aware of performance problems which can be there when using the filtering over flowfield...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kavin6kavin6 Member Posts: 15
    thanks.. i will try..
  • Yaroslav_GaponovYaroslav_Gaponov Member Posts: 158
    Hi All

    Usualy c/al code like this:

    tableA.reset;
    if tableA.find('-') then
    repeat
    tableA.Mark(True);
    until tableA.next = 0;
    tableA.MARKEDONLY(False);

    tableB.reset;
    if tableB.find('-') then
    repeat
    if tableA.get(tableB."Entry No.") then
    tableA.Mark(False);
    until tableB.next = 0;

    tableA.MARKEDONLY(True);

    // to do anything with tableA ...
  • kavin6kavin6 Member Posts: 15
    Thanks it solved my problem eventhough it will be slow.
Sign In or Register to comment.