phpBMS

TableDefinitions/QuickSearch

Adding a Quick Search

Many screens in phpBMS present the user with a search form and results table collectively known as a Search Screen. The first field in the form(on the Clients screen for example) is labeled 'find' and contains Quick Search queries that narrow down results according to predefined criteria(for example Prospects only). The Quick Searches presented on any screen are easy add and modify as needed. To add a new Quick Search:

  1. Navigate to Tools->Table Definitions
  1. Scroll down to select the screen that will use the new Quick Search and click the pencil icon to edit the table definition.
  1. On the next screen click the 'quick search' tab and you will see the list of quick searches.

Hopefully one of the existing quick searches is close to the one you want to add but for this example, we'll add a quick search for Prospects added in the last 90 days. Looking at the existing quick searches for the Clients table definition, we see one called Last Week's Prospects that is very similar to what we want. It contains the following information:

Name: Last Week's Prospects
Access (role): EVERYONE
Search (SQL where clause): clients.type = "prospect" and ( TO_DAYS(now())- TO_DAYS(clients.creationdate) ) < 7 
and clients.inactive=0

We can duplicate this information quite closely to create our new quick search:

  1. At the bottom of the screen is a form called "Add Quick Search Item". Fill in the name field as "Last 90 Days Prospects" and leave the Access field at the default of EVERYONE.
  1. Copy the contents of the Search field from the "Last Week's Prospects" row above and paste it into the Search field.
  1. Finally we need to change the section 'TO_DAYS(now())-TO_DAYS(clients.creationdate))<7' which compares the date the prospect was created to today's date and replace the 7 with 90. The Search field should now contain: clients.type = "prospect" and (TO_DAYS(now())-TO_DAYS(clients.creationdate))<90 and clients.inactive=0
  1. Click 'add quick search item' and use the up and down arrows next to your new item to order the Quick Search items as desired.

Now you can go to the Clients screen and test out your new Quick Search. Quick Searches give you a lot of flexibility and speed when working with the system on a day to day basis.

Scanned by Orvant Copyright © 2010 Kreotek, LLC. All Rights reserved.