CLOSE   
The Accolade Group
The Accolade Group
The Accolade Group
Support: 9:00am-5:00pm  Phone: 02 9672 6200 Email: helpdesk  

Go Back   Accolade Forum > FAQs & Hints and Tips > GoldMine

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-10-2006, 01:33 PM
admin admin is offline
Administrator
 
Join Date: Mar 2006
Posts: 13
Default Creating Filters to search Contact History

Question: Is it possible to create a filter that searches the Contact History or tables other than Contact1 and Contact2?

Answer: Yes, you can create a filter and then edit the SQL Expression to add an SQL statement to search any table including History,Details or Calendar.
Below is an example of a filter that includes only accounts with a phone call or appointment completed within the last 7 days:

Create and save a Filter, any filter such as as 'Account is not Empty'
In the list of filters, highlight the filter and click 'Properties'
Under the Properties tab, select the SQL Query radio button and click 'Edit Expression'
Replace the initial SQL with a WHERE clause that picks the accounts with the data you want. For this example, it is:

Where c1.AccountNo in (select AccountNo from ContHist where sRecType in ('A','C') and OnDate > getdate() -7 and ResultCode = 'COM'

Click OK, Also, you do not need to edit anything in the dBase expression window.

Preview or Activate the filter to review the results.

This process can be used to include SQL statements in the Filters window instead of the SQL queries window, so you no longer need to build an SQL
query and then build a Group from the results. Your SQL Query is now dynamic as opposed to static.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 01:24 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) The Accolade Group 2004-2006
another online solution from coconet