Skip to main content

Usually when I wanted retrive a group of selected items for example Countries: Singapore, Malaysia and Thailand, I need to click match 'Match One or More' in the Sub Menu. This is reasonable as I am not asking to retrive an entry with three Countries name all together.

What I am confuse about is, apply the same theory as above. If wanted to 'remove' countries from the list, in order to get the correct result, I have to select 'Must Match All' in the Sub Menu(Country List) instead of 'Match One or More'. What is the reason behind this?

Thanks for the help, I really appreaciate.
Original Post

Replies sorted oldest to newest

I *think* this is really just a basic logic question.

A boolean expression is one that evaluates to either TRUE or FALSE. The expression

Country='Canada'

will either be TRUE or FALSE depending on what is in the "Country" field (leaving aside NULL values for the moment).

Logical negation is the process of "flipping" values between TRUE and FALSE.

NOT(TRUE) = FALSE
NOT(FALSE) = TRUE

When selecting records for multiple countries you need to OR the values together, e.g.

Country='Singapore' OR Country='Malaysia'

When negating a boolean expression you must remember that

NOT(A OR B) = NOT(A) AND NOT(B)

so therefore

NOT(Country='Singapore' OR Country='Malaysia')

is the same as

Country<>'Singapore' AND Country<>'Malaysia'

Does that help?

.

Add Reply

Post
LEGAL INFO
CONTACT US
Copyright 2007-2018 Advoco Solutions Ltd. All Rights Reserved.
×
×
×
×
Link copied to your clipboard.
×