Date filter for a Page

stonystony Member Posts: 122
Hello,

I have the following problem. We have an additional table, which has the item number and the language code as a key. This is where the data for creating a data sheet is stored.
This table has about 50 fields.

Now I would like to filter the item list and then only display these corresponding items in another page, which then displays the data from the additional table.
For an item I currently solved it like this

ArtikelDatenblattDaten.SETRANGE(Artikelnr,"No.");
ArtikelDatenblattDatenListe.SETTABLEVIEW(ArtikelDatenblattDaten);
ArtikelDatenblattDatenListe.RUN;

But how do I do that now for several items.
It would work with a variable in which I write all items numbers and use it as a filter. The only problem I have is that I can't get by with 1024 characters.
Does anyone have an idea how I could solve this.

lg
stony

Answers

  • vaprogvaprog Member Posts: 1,144
    Depending on your NAV/BC version, the filter string may be longer than 1024 characters. Also Codeunit 46 may help you get a shorter filterstring by using ranges where possible.

    If this still does not help, you can filter the items in the page using modified triggers OnFindRecord and OnNextRecord. See Page 31 Item List for an example. Here the list gets filtered by Item Attributes. You don't need a temporary table to implement your requirement. You can use a reqular Item record, filltered the same way as in your calling page.
  • ResolusResolus Member Posts: 40
    Hmm, I think using a function to fill a Temporary Record variable, and pass that along to the page which will then display it, would still be a very easy solution. Page must also be on temporary = true ofcourse, so direct changes are not going to work unless you provide your own code in the onmodify of the page.
Sign In or Register to comment.