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

  • Author
    Posts
  • #22623

    farrago

    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

    pcutler

    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

    khultquist

    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

    farrago

    Thank You!

  • #22627

    farrago

    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

    MikeBucklaew

    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

    pcutler

    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.