Community
Showing results for 
Search instead for 
Do you mean 
Reply

Query help in Act 6.0

New Member
Posts: 3
Country: USA

Query help in Act 6.0

Could someone please demonstrate how an advanced query should be written that will find the following:

 

All contacts in Lake county that are not Inactive or Dead.  Fields involved are "County" and "Status".

 

I've tried everything I can think of that makes sense, and while I get no errors (syntax is correct), I continue to get results with inactive and dead contacts in the lookup.

 

This is the most logical thing I've tried... what am I doing wrong?

 

((Status !<> "Inactive"*)||(Status !<> "Dead"*)) AND ((County = "Lake"*))

 

Also, Act added the "!" before the "<>".  If I remove them and save, Act simply puts them back.  It appears that Act is adding a NOT in front of the NOT EQUAL TO, which doesn't make any sense to me.  I've also tried "!=" and some other things. 

 

Nickel Elite Contributor
Posts: 595
Country: USA

Re: Query help in Act 6.0


 

((Status !<> "Inactive"*)||(Status !<> "Dead"*)) AND ((County = "Lake"*))

 


You logic is flawed. You are asking for all contacts that are not inactive or dead, all your contacts in Lake county will fit in one or the other category.

Roy Laudenslager
ACT! Certified Consultant
Techbenders
royel@techbenders.com
New Member
Posts: 3
Country: USA

Re: Query help in Act 6.0

[ Edited ]
I see that.  How do I write a correct query?
Message Edited by themadczar on 06-10-2008 10:06 AM
Nickel Elite Contributor
Posts: 595
Country: USA

Re: Query help in Act 6.0

Actually I can't easily come up with a single query to accomplish what you want. I believe that you can do it with a chain of lookups using Lookup by Example where you can use operators in the fields. Try this:

1. Lookup equal to Lake county.

2. Lookup by Example for Not Equal to dead and choose Narrow the Lookup.

3. Lookup by Example for Not Equal to inactive and choose Narrow the Lookup.

 

That should give you what you want.

Roy Laudenslager
ACT! Certified Consultant
Techbenders
royel@techbenders.com
Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: Query help in Act 6.0

[ Edited ]

( ( "ID/Status" <> "Dead" ) ) AND ( ( "ID/Status" <> "Inactive" ) ) AND (( "County" = "Lake" ))

 

People confuse the boolean AND and OR...

Message Edited by GLComputing on 06-14-2008 10:29 PM
New Member
Posts: 3
Country: USA

Re: Query help in Act 6.0

I copied and pasted this into a query, and it said that the query is not formatted correctly.  Error.
Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: Query help in Act 6.0

You might need to remove some spaces... when I put it in normally, it changed quote/right_bracket to ")