Product Review: SearchFlash

by Dave Harms

Published 1999-07-20    Printer-friendly version

SearchFlash is a set of templates, procedures, and data files that make it relatively easy to add useful searching and tagging to any Clarion browse. The combination of searching and tagging is particularly appropriate since there are many situations where you want to restrict the display of records to just those which meet the search criteria.

I tested SearchFlash on the application I use for tracking Clarion Magazine subscriptions. The installation of SearchFlash went smoothly; the install program correctly located my Clarion5 directory (a nice touch), and asked me if I wanted to install the ABC or Legacy templates. (If you wish to install both you'll need to make sure you use a different demo directory each time.)

The help file, which can be displayed after install, offers specific instructions on installing SearchFlash. The steps are as follows:

Step 1. Register the template.

Step 2. Import SFLASH.TXD into your application's dictionary. This TXD contains definitions for files used to store tagging and query information. (There is a separate TXD containing just the tag file, and you can import this multiple times if needed, giving the file a unique name and prefix each time.)

Step 3. Close the dictionary, open the application, and import the seven core procedures from DEMO.APP. You'll want to follow the help closely to be sure you get just the procedures you need, as DEMO.APP contains a number of other procedures. A separate application containing just the core procedures might be a better way to go.

Step 4. Go to the Global extensions list and add the SearchFlash extension. You will need to add the files whose browses use the SearchFlash button.

Step 5. Populate the SearchFlash button onto the window containing the browse you want to be able to search. The help file again contains useful, specific information. A checkbox for filtering the browse to show only tagged items is also populated.

Step 6. Add a tag icon to your list box.

Step 7. The help specifies that you need to add SFLFirst, SFLNext and SFLSummary to the list of called procedures for that browse. I found it easier to ensure that those procedures have the Declare Globally box checked, thereby saving myself a few extra steps on subsequent browses.

Step 8. Fill in the SearchFlash button options (see Figure 1). At a minimum you'll need to specify the file SearchFlash is searching, a unique record ID field, the tag icon field, and some information for each tab on your browse including the key and key fields and any range limits.

Figure 1. SearchFlash button template prompts, Primary File tab.

searchflash_fig1.gif (4556 bytes)

Warning: SearchFlash needs to know the name of your browse object, and it assumes that you've followed the ABC convention of numbering browse objects. If you've renamed your browse objects to something meaningful you'll just have to change them back again to BRWx, because all you're allowed to specify in the SearchFlash templates is the browse object number (see the Parent's Browse Ref prompt), not the name.

For browses with a lot of tabs it might be difficult to synchronize all of the search template settings with your browse's settings. It would be ideal if the search template were attached to the browse and could inherit the necessary information, but I don't know if this is a practical alternative.

Text Field Searching

Living dangerously, I tested SearchFlash on a browse which also uses Brian Staff's Xplore templates and the two products co-existed without any difficulties. I began by testing the "all text fields" search, shown in Figure 2.

Figure 2. Searching on all text fields.

searchflash_fig2.gif (7033 bytes)

Note that you can start searching from the beginning of the file or from the current position. If you choose to display the data as it is found SearchFlash will show you the record number, the name of the field in which it found the data (remember that on this tab you're searching all the text fields), and the data itself.

If you choose to tag records as they're found you can then use the Tagged Records checkbox to restrict the browse to only the found records. The number of tagged records is shown in the caption bar, and tags can be appended to existing tags so you can build up a result set from a series of searches.

SearchFlash also provides three ways of storing tagging information: in a global queue (the default); in a tag field in the file; or in a separate tagging file. For smaller data sets the queue is the fastest, though of course tagging information is lost when the application is closed.

QBE Searching

You can use QBE and text searching in conjunction if you wish, leveraging the power of both techniques. All of the tagging features described for text field searching apply to QBE searching as well. One difference is that in a QBE search the found data cannot not displayed for each record since you may be searching for multiple conditions.

Figure 3 shows the QBE tab on the search window. This tab lets you query up to six fields using AND or OR conditions. You can also save and retrieve your queries from this window.

Figure 3. Searching using QBE.

searchflash_fig3.gif (8363 bytes)

Additional Templates

Search flash comes with control templates for Tag All, Untag All, and tag toggle buttons. There are also templates to allow the use of tagged records in reports and processes.

SearchFlash is compatible with all versions from CW2002 to C5 ABC/Legacy, and all source code is supplied.

Clearly a lot of thought has gone into this product. Instructions on using the template in a multi-dll app are included (a most important feature) and there are a number of settings available for fine-tuning behaviour, such as setting fields to exclude from QBE searches and searching related files.

The help is quite clear and concise, and includes a FAQ to help the developer over common problems. I also received prompt response to several questions about the use of the product. The author, Mike McLoughlin, is active in the TS newsgroups.

Minor quibbles aside, this is an excellent tool which will enhance your users' ability to locate and display data.

Price: $149

Web Site: http://www.sterlingdata.com/search.htm

Contact: Mike McLoughlin

 


David Harms is an independent software developer and the editor and publisher of Clarion Magazine. He is also co-author with Ross Santos of Developing Clarion for Windows Applications, published by SAMS (1995), and has written or co-written several Java books. David is a member of the American Society of Journalists and Authors (ASJA).

Printer-friendly version

Reader Comments

To add a comment to this article you must log in.

 
 

Search

 

Advanced Search
Topical Index

Related Articles

Subscribe to
ClarionMag

One year: $169

(includes all back issues since '99)

Renewals from $119

Two years: $269

Renewals from $219

More Info

Subscribe Now!

ClarionMag Blog

RSS Feeds

Updates via Email

Enter your Email


Powered by FeedBlitz

Quick Links