This topic contains 6 replies, has 0 voices, and was last updated by pcutler 6 years, 8 months ago.

  • Author
    Posts
  • #22623 Score: 0

    farrago
    • Contributions: 0
    • Level 1

    How would you filter transaction search by number of line items? Like if I need to find all orders with 1 line item and then all orders with 2 line items… etc etc
    This is a cached copy. Click here to see the original post.

  • #22624 Score: 0

    pcutler
    • Contributions: 0
    • Level 1

    On the criteria tab and standard subtab, add a filter for mainline=false. Optionally, add filters such as taxline=false, etc. to exclude other line types that you might not be interested in.

    On the criteria tab and the summary subtab, add a filter where the COUNT of Line ID is the desired number.

  • #22625 Score: 0

    khultquist
    • Contributions: 0
    • Level 1

    I don't know if you can 'filter' in the strict sense of the word — as in 'available filters' on a saved search. But you can use 'summary criteria' in a saved search.

    Standard Criteria

    Main Line = F

    Summary Criteria

    Count of Line ID = 1

  • #22626 Score: 0

    farrago
    • Contributions: 0
    • Level 1

    Thank You!

  • #22627 Score: 0

    farrago
    • Contributions: 0
    • Level 1

    This didn't work by the way. Ug. I wish NS just had a field called "Count of Lines" that worked and only counted the number of line items on any transaction record.

  • #22628 Score: 0

    MikeBucklaew
    • Contributions: 0
    • Level 1

    Have you tried a summary criteria something like MAX of Line Sequence Number = 3? You will have to take into account tax, shipping, discount lines etc.

  • #22629 Score: 0

    pcutler
    • Contributions: 0
    • Level 1

    Originally posted by farrago

    View Post

    This didn't work by the way. Ug. I wish NS just had a field called "Count of Lines" that worked and only counted the number of line items on any transaction record.

    While the grouped search did work, another option would be to create a custom field called "Count of Lines" and set it with a script.

You must be logged in to reply to this topic.