Page 1 of 2 1 2 >
Topic Options
#29561 - 11/02/11 12:15 PM Need Gridview Filter Help
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
What am I doing wrong?

AND(
{Order Complete?} =FALSE(),
{Doc Type} ="O",
{OELine Qty Backordered} >0,
{Cust #} ="TD5775",
OR(
{OEHead Salesperson} ="KINGSN"
))

I don't really know how to use AND and OR together, but what I'm trying to accomplish is:

Show me all incomplete orders with items on back order for customer TD5775 and all other customers if their salesperson is KINGSN.

Can anyone help?
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top
#29564 - 11/02/11 02:56 PM Re: Need Gridview Filter Help [Re: SusanTennier]
Bruce Gardner Offline
Adagio Wizard

Registered: 06/15/04
Posts: 3565
Loc: Toronto ON, Canada
Susan:

Try:
AND(
{Order Complete?} =FALSE(),
{Doc Type} ="O",
{OELine Qty Backordered} >0,
OR(
{Cust #} ="TD5775",
{OEHead Salesperson} ="KINGSN"
)
)

The first 3 lines have to be true and only line 4 or line 5 need to be true.
_________________________
Bruce Gardner
ARX Business Solutions Inc.

Top
#29565 - 11/02/11 03:15 PM Re: Need Gridview Filter Help [Re: Bruce Gardner]
Wally Kunz Offline
Adagio Scholar

Registered: 11/16/01
Posts: 96
Loc: Vancouver, BC Canada
Bruce -- I beg to differ. I think the terminal ")" should be moved up to replace the "," before "OR". This requires the first 4 lines to all be true OR the fifth true.

Susan -- The problem with English is that it's not logically exact. When you say AND all other ..., you really mean OR all other.

Consider the English phrase "all companies with a head office in Toronto AND Montreal". This excludes every company since they can only have one head office so it can't be both in Toronto AND in Montreal.
In English, it is understood the phrase to mean "all companies with a head office in Toronto as well as all companies with a head office in Montreal". The "as well as" is a logical OR.

Can you try it this way?

AND(
{Order Complete?} =FALSE(),
{Doc Type} ="O",
{OELine Qty Backordered} >0,
{Cust #} ="TD5775"
)
OR(
{OEHead Salesperson} ="KINGSN"
)
_________________________
Wally Kunz
Softrak Systems Inc

Top
#29566 - 11/02/11 03:16 PM Re: Need Gridview Filter Help [Re: Bruce Gardner]
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
YESS!!!! Thanks Bruce. Now I get it.
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top
#29568 - 11/02/11 03:20 PM Re: Need Gridview Filter Help [Re: SusanTennier]
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
Hi Wally,

I tried yours too.. but it wouldn't evaluate. Thanks anyway though!
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top
#29569 - 11/02/11 03:38 PM Re: Need Gridview Filter Help [Re: SusanTennier]
Wally Kunz Offline
Adagio Scholar

Registered: 11/16/01
Posts: 96
Loc: Vancouver, BC Canada
Susan -- I've been wrong before!

Are you sure Bruce's gives you the correct items? I'm confused about how you want to select on the customer.
_________________________
Wally Kunz
Softrak Systems Inc

Top
#29570 - 11/02/11 04:00 PM Re: Need Gridview Filter Help [Re: Wally Kunz]
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
Yes, Bruce's gives me the results I was hoping for.

The AND section shows results for all incomplete orders with items on back order.

The OR section narrows the above results to customer TD5775 and all customers with KINGSN salesperson.
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top
#29571 - 11/02/11 07:41 PM Re: Need Gridview Filter Help [Re: Wally Kunz]
Bruce Gardner Offline
Adagio Wizard

Registered: 06/15/04
Posts: 3565
Loc: Toronto ON, Canada
Hi Wally:
I agree that English isn't logically exact and your example demonstrates that. I'm not even certain my one line explanation earlier was precise enough.

It doesn't help that the GridView syntax is a little cryptic, but unlike English, it at least has a defined set of rules.

I picture a large barrel and a smaller bucket. The barrel contains all of the orders that have been entered. Susan wants only the items that are i) Orders, ii) incomplete and iii) have a backorder quantity. The first 3 lines separate out those items and move them to the smaller bucket.

Now that they are in the bucket, she wants to filter them further. She wants only the ones belonging to Customer TD5775 OR belonging to any customer associated with Salesman KINGSN. The last 2 lines do that because they are in brackets after the "OR" operator.

In your example you would have transferred all Incomplete orders with a Backordered quantity belonging to TD5775 to the bucket. That's good. But the final part would have transferred all orders belonging to any customer associated with Salesman KINGSN regardless of whether they are Complete or have Backorders. It would also have included Invoice and Credit Note transactions. That would be a lot of records.

Susan's description of her goal could have been interpreted to mean that result. However it would have resulted in a meaningless report so the other interpretation was more likely.
_________________________
Bruce Gardner
ARX Business Solutions Inc.

Top
#29572 - 11/02/11 08:49 PM Re: Need Gridview Filter Help [Re: Bruce Gardner]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Wally is in the marketing department, not the R&D department.
_________________________
Andrew Bates

Top
#29579 - 11/03/11 07:56 AM Re: Need Gridview Filter Help [Re: Retired_Guy]
Bruce Gardner Offline
Adagio Wizard

Registered: 06/15/04
Posts: 3565
Loc: Toronto ON, Canada
But it was clearly a slow day in Marketing! And by "slow", I'm referring to the pace of the day, not the capabilities of the Marketing staff.


Edited by Bruce Gardner (11/03/11 07:59 AM)
_________________________
Bruce Gardner
ARX Business Solutions Inc.

Top
Page 1 of 2 1 2 >


Moderator:  Christa_Meissner 
Who's Online
1 registered (Tanya_Belanger), 72 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1862 Members
5 Forums
14383 Topics
70343 Posts

Max Online: 432 @ 01/20/25 10:17 PM
January
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31