This topic contains 7 replies, has 0 voices, and was last updated by evan_goldberg 14 years, 11 months ago.

  • Author
    Posts
  • #8171 Score: 0

    peakroad
    • Contributions: 0
    • Level 1

    Hello – I’m pretty sure I’m missing something obvious here and/or I’m totally not used to the Saved Search interface but…

    We’re trying to develop a Search that will send email alerts when any given order has a TOTAL quantity of items greater than 1. Have tried under Results using grouping by order number and then sum on Quantity but that doesn’t actually filter out orders with only 1 item. It seems we need to do this in Criteria but can’t seem to get what I’d expect standard SQL to work.

    By the way, the reason we need this is that 99.9% of our orders consist of 1 unit and anything more than that would suggest a data entry error.

    Thanks for any help!

    Rob.
    This is a cached copy. Click here to see the original post.

  • #8172 Score: 0

    evan_goldberg
    • Contributions: 0
    • Level 1

    RE: Sum of Quantity as Criteria in Saved Search

    Did you use summary instead of standard criteria?

  • #8173 Score: 0

    peakroad
    • Contributions: 0
    • Level 1

    Hi, Evan – thanks for the response.

    We did try summing on Quantity in criteria with the specification that the sum be greater than 1. This seems to get orders where there are multiple units of one line item but not multiple line items.

    Any thoughts?

    Thanks!

  • #8174 Score: 0

    evan_goldberg
    • Contributions: 0
    • Level 1

    RE: Sum of Quantity as Criteria in Saved Search

    count of line > 1?

  • #8175 Score: 0

    peakroad
    • Contributions: 0
    • Level 1

    RE: Sum of Quantity as Criteria in Saved Search

    Originally posted by evan_goldberg

    count of line > 1?

    Thanks, Evan. Figured out a way to do it although I’m not feeling 100% confident that it won’t break at some point… basically used Sum Quantity > 2 for Criteria, Group on Number/Sum on Quantity for Results.

    The reason I’m not fully confident in this is that for some reason, single item orders are returning two quantity lines when we search. Not sure how to filter those out.

  • #8176 Score: 0

    evan_goldberg
    • Contributions: 0
    • Level 1

    RE: Sum of Quantity as Criteria in Saved Search

    Are you trying to alert for orders where the total quantity for any individual item is > 1, or orders where there are more than one line for a given item? or something else entirely?

  • #8177 Score: 0

    peakroad
    • Contributions: 0
    • Level 1

    RE: Sum of Quantity as Criteria in Saved Search

    Originally posted by evan_goldberg

    Are you trying to alert for orders where the total quantity for any individual item is > 1, or orders where there are more than one line for a given item? or something else entirely?

    We want an alert for “Total quantity for any individual item > 1” AND “More than one line for a given item” AND “Total quantity of items for any order > 1”

  • #8178 Score: 0

    evan_goldberg
    • Contributions: 0
    • Level 1

    RE: Sum of Quantity as Criteria in Saved Search

    Do you mean AND or OR, i.e. all of those criteria must be true or at least one of them must be true?

You must be logged in to reply to this topic.