Date filter for a Page

stony
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
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
0
Answers
-
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.0 -
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions