Select with an AND Condition



I have some sales document data

[Sales Doc]  [Line No]   [Product]

1000             10             X

1000             20             Y

1000             30             Z


2000             10             A

2000             20             B

2000             30             Z


3000             10             X

3000             20             A

3000             30             Z



My requirement is to have a user be able to select products (A user could select any combination of products), so in our example the pool of products is [A,B,X,Y,Z], however there are hundreds of products.


When the User selects Product X AND Z, i expect the results to be Sales Lines that include X AND Z, so in this case

[Sales Doc]  [Line No]   [Product]

1000             10             X

1000             30             Z

3000             10             X

3000             30             Z


Notice that Sales Doc 2000 is not listed as it doesn't contain BOTH products.


I haven't figured out how to solve this problem with standard Card functionality, i'm sure there is a way with a card and i'm open to other avenues, but am looking for some guidance, perhaps something i have not yet thought of.


Thank you!


Best Answer

  • jaredpk
    Accepted Answer

    Hi Nick -- Yes an custom app could do this.  For that'd you'd clarify the requirement with our App team and they would build and test with you to make this work.


  • Good morning @Nick_Bertz, what other fields do we have at our disposal here? Count of products per?



  • Hello,


    We have a value field 'Total Price' for each line on the document, ie: $50

    We hae a 'Quantity' for each line on the document

    We have a 'Stage' associated with each line (all lines within a single document will have the same stage) ie: Won, Lost

    We have a 'Date' field indicating when the final disposition of the document occured, corresponds with 'Stage'.


    Essentially what i have tried and failed is creating a stacked Bar chart using date on the X axis, and Sum of 'Total Price' on the Y Axis, the series i used was 'Stage'.  I then used a quickfilter on 'Product' but the quickfilter I believe uses 'OR' logic.


    Hope that helps!

  • Hi -- I just talked this over internally.  Nick, you are correct.  This can't be done currently.  To put this on the radar as an enhancement request, I would put this ideas exchange.

  • Jared,


    Thanks for your feedback. 


    Would approaching this requirement from an App perspective possibly provide a solution? 


    I am curious if the flexibility of an App might allow more control over the SQL command that gets issued, perhaps allowing the 'OR' comparison for this requirement to be implemented.