preset filters when opening an entry table/form

mlaforsmlafors Member Posts: 18
When I am searching the Item Ledger Entry table or the Value Entry table it takes a rather long time before the data I want to see is filtered, because of the increasing entries in these tables.

Is it possible to set some filters before opening a table of form so that the entries are directly filters on opening.

I am using NAV 3.70.

I hope some can help me on this.

Comments

  • NaviDevNaviDev Member Posts: 365
    Setting a filter directly on the table upon opening is not possible. But creating a form bound to a table will be. Just set the SourceTableView TableFilter.
    Navision noob....
  • mlaforsmlafors Member Posts: 18
    Thanks for your very quick answer, but with the table filters in sourcetableview you can only set te filters once.

    I would like to be able to set different filters, without changing the settings in sourcetableview.

    Is it possible to set filters in a different form and than tranfer these to the table that you are opening?
  • krikikriki Member, Moderator Posts: 9,110
    Or you can create a new form (NOT bound to a table) in which the user can put some filters (Item,location code,posting date,...) and then put them on the entry-record and launch the form.

    BTW : are you using SQL- or Navision-DB?
    For the Navision-DB, it is a good idea to use the correct index before filtering.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • mlaforsmlafors Member Posts: 18
    kriki wrote:
    Or you can create a new form (NOT bound to a table) in which the user can put some filters (Item,location code,posting date,...) and then put them on the entry-record and launch the form.

    BTW : are you using SQL- or Navision-DB?
    For the Navision-DB, it is a good idea to use the correct index before filtering.

    I am using Navision-DB.
    I think this is what I need, but how can I put the filter information on the entry-record?
  • kapamaroukapamarou Member Posts: 1,152
    If there are a lot of entries and you filter on a field that is not included in a key then it will be slow. Have you considered the following (for example) for the Item Ledger Entry?:

    Create a new form in which you don't display any flowfields at all. The form will show the data fast enough. Then add a button to open another form showing all the fields but with the filtered entries that you have selected from the previous form.
  • krikikriki Member, Moderator Posts: 9,110
    mlafors wrote:
    kriki wrote:
    Or you can create a new form (NOT bound to a table) in which the user can put some filters (Item,location code,posting date,...) and then put them on the entry-record and launch the form.

    BTW : are you using SQL- or Navision-DB?
    For the Navision-DB, it is a good idea to use the correct index before filtering.

    I am using Navision-DB.
    I think this is what I need, but how can I put the filter information on the entry-record?
    Another way might be using a report in which the user puts the filters he wants.
    In the OnBeforeReport-trigger, you just need this code:
    FORM.RUNMODAL(0,"Item Ledger Entry");
    CurrReport.QUIT;
    
    Maybe you should use http://www.mibuso.com/forum/viewtopic.php?t=21112 to select a good key before running the FORM.RUNMODAL-statement.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • mlaforsmlafors Member Posts: 18
    I have deleted the flowfields in the form and thats much faster.
    How can enter filters and tranfer these to the original form with the flowfield?
  • kapamaroukapamarou Member Posts: 1,152
    try Rec.COPYFILTERS(FromRecord)
  • slmaluwaslmaluwa Member Posts: 366
    Newbie answer:

    How about using a proper key and FILTERGROUPS ?
    Will it help?
    "A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
Sign In or Register to comment.