How to filter Sales List for different no. series

mkpjsrmkpjsr Member Posts: 587
Hi all,

I am using two different no series in sales invoices, so whenever i use the sales list, data from both no. series are visible.

Here i want to create two copies of Sales List and filter both the sales list for a particular no. series only, so that i can show only one no. series in a sales list and rest in another sales list.

Is is possible, if yes then how can we do this
Can anybody guide me.

Comments

  • ssinglassingla Member Posts: 2,973
    Field "No. Series" in the sales header table
    CA Sandeep Singla
    http://ssdynamics.co.in
  • mkpjsrmkpjsr Member Posts: 587
    ssingla wrote:
    Field "No. Series" in the sales header table


    how this field will help me.
  • ssinglassingla Member Posts: 2,973
    Add a filter for this field in 2 list forms.
    Filter1 := No. Series 1
    Filter2 :=No. Series 2
    CA Sandeep Singla
    http://ssdynamics.co.in
  • SavatageSavatage Member Posts: 7,142
    edited 2009-12-30
    mkpjsr wrote:
    Here i want to create two copies of Sales List

    What if you change the sales list form by adding a tab control from the toolbox around the Sales List table box.
    Then you can add two tabs one for each Number series. Each tab will contain the Sales List tablebox but filtered to show one one or the other number series.

    Should be easy

    Another one could be Create a Global Variable called "No Series Filter" type OPTION
    Options of "Series 1" & "Series 2" or whatever name you need "Jobs" & "Work Orders" for example.
    a textbox at the bottom of the sales list form with sourcexp= "No Series Filter".
    Then On (example)
    OnAfterValidate()
    IF "No Series Filter" = "No Series Filter"::"Series 1"  THEN BEGIN
      RESET;
      SETRANGE("No.",'A1-*');
    END;
    IF "No Series Filter" = "No Series Filter"::"Series 2"  THEN BEGIN
      RESET;
      SETRANGE("No."'A2-*');
    END;
    CurrForm.UPDATE;
    
    Don't forget Glue = Bottom
    **best to use the case statement above^ instead of if
    Just some ideas 8)

    Ooops Edit: Since the list form is usually uneditable then the textbox at the bottom will not allow you to make any changes therfore if you add

    OnActivate()
    CurrForm.EDITABLE(TRUE);
    OnDeactivate()
    CurrForm.EDITABLE(FALSE);
    on the textbox it will work fine.

    We use this "filter box" for commonly used filters on our Item List - But will work on any list See pic
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    Savatage wrote:
    mkpjsr wrote:
    Here i want to create two copies of Sales List

    What if you change the sales list form by adding a tab control from the toolbox around the Sales List table box.
    Then you can add two tabs one for each Number series. Each tab will contain the Sales List tablebox but filtered to show one one or the other number series.

    Should be easy

    Another one could be Create a Global Variable called "No Series Filter" type OPTION
    Options of "Series 1" & "Series 2" or whatever name you need "Jobs" & "Work Orders" for example.
    a textbox at the bottom of the sales list form with sourcexp= "No Series Filter".
    Then On (example)
    OnAfterValidate()
    IF "No Series Filter" = "No Series Filter"::"Series 1"  THEN BEGIN
      RESET;
      SETRANGE("No.",'A1-*');
    END;
    IF "No Series Filter" = "No Series Filter"::"Series 2"  THEN BEGIN
      RESET;
      SETRANGE("No."'A2-*');
    END;
    CurrForm.UPDATE;
    
    Don't forget Glue = Bottom

    Just some ideas 8)

    Ooops Edit: Since the list form is usually uneditable then the textbox at the bottom will not allow you to make any changes therfore if you add

    OnActivate()
    CurrForm.EDITABLE(TRUE);
    OnDeactivate()
    CurrForm.EDITABLE(FALSE);
    on the textbox it will work fine.

    We use this "filter box" for commonly used filters on our Item List - But will work on any list See pic

    Hi thanx for the reply,
    i tried the second approach, here after selecting the option it is showing only,
    A1-* and A2-* and not the actual data

    what may be the reason
    Markandey Pandey
  • SavatageSavatage Member Posts: 7,142
    i tried the second approach, here after selecting the option it is showing only,
    A1-* and A2-* and not the actual data

    what may be the reason

    The reason is I don't know what your # series looks like or what it starts with..
    A1-* & A2-* are just for example purposes.
  • mkpjsrmkpjsr Member Posts: 587
    Savatage wrote:
    i tried the second approach, here after selecting the option it is showing only,
    A1-* and A2-* and not the actual data

    what may be the reason

    The reason is I don't know what your # series looks like or what it starts with..
    A1-* & A2-* are just for example purposes.

    i know that, in our case the number series is like
    JOB-* and SO-* , so i have written

    SETRANGE("No.",'SO-*);
  • SavatageSavatage Member Posts: 7,142
    so did you solve your problem? Did setrange work? try setfilter in not.
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    Savatage wrote:
    so did you solve your problem? Did setrange work? try setfilter in not.


    i tried using setfilter and its working also but while i am scrolling the list form ,its giving a error
    "Sales Header cannot be Inserted in this form"
    Markandey Pandey
  • SavatageSavatage Member Posts: 7,142
    Savatage wrote:
    so did you solve your problem? Did setrange work? try setfilter in not.
    i tried using setfilter and its working also but while i am scrolling the list form ,its giving a error
    "Sales Header cannot be Inserted in this form"

    you probably see this when you scroll all the way to the bottom and a *new line appears...
    Change the proprerty on the form "INsert Allowed" to NO will solve that problem.
Sign In or Register to comment.