Access ELF Documentation Access ELF Tutorials Access ELF On-Line Help Access ELF Downloadable Help File Access ELF FAQ VB ELF Documentation VB ELF Tutorials VB ELF On-Line Help VB ELF Downloadable Help File VB ELF FAQ
Configuration & Licensing Options
Critical Opinions
Our Users Talk Back






Access ELF Selectable Settings Window


Preferences                                                   Settings Tab 1

Help Style offers your choice of Local or Internet-based help. "Local help file" selects a Help application called accelf.chm, which is copied into your System or System32 directory upon installing Access ELF. Choosing "Internet-based help" selects the documentation portion of the ELF Software Web site.

Query corner snap determines the position of the query window; offset is useful for allowing access to scrollbars of underlying windows.

Worksheet Graph determines whether the Worksheet opens in full-graph or split graph mode when you type questions that request graphs, with Worksheet response style selected.

The AutoImport Phrases option is designed to assist users of pre-4.0 versions of Access ELF migrate their applications to the format of the current release. Its effect is to allow the automatic transfer of ELF Phrase tables from a user's application (.mdb) into the Custom.mdb file now associated with each View of a database. It can also be used to help distribute the same Phrase list (or the shared part of a Phrase list) to the different Custom.mdb files belonging to various Views of the same database.

Express Unattended is a switch for suppressing all warnings and dialog boxes that may appear during an Express Analysis. The idea is to minimize the required interaction (once a user clicks the Express button). This lets developers provide simple "one-click" instructions for regenerating predefined Views to users of their redistributed applications.

Express Unattended is a switch for suppressing all warnings and dialog boxes that may appear during an Express Analysis. The idea is to minimize the required interaction (once a user clicks the Express button). This lets developers provide simple "one-click" instructions for regenerating predefined Views to users of their redistributed applications.

The decision whether to use or ignore existing analysis tables can be made in advance by setting the Use Prior Analysis checkbox, which becomes active whenever "Express Unattended" is checked.

The Permit Rewording checkbox is new in version 4.0, and enables a built-in error handler which attempts to find alternate ways of interpreting the user's question. This feature may or may not be appropriate for your application. It's probably best suited for those situations where users have very little familiarity with the database and its contents, and would have less patience for the kind of "Sorry, please try again" message that can result from incorrectly-phrased questions.

For development purposes, the Warn on Rewording checkbox lets you instruct the system to provide feedback on exactly when this special feature is invoked. This lets you scrutinize more carefully the responses and/or SQL translations which are generated as a result of these "rewordings". (Note that warning message boxes describing the rewording of the original question will not appear unless the "Warn on Rewording" checkbox and the "Show Warnings" checkbox (located on the Advanced tab of Settings) are BOTH checked.

Log Queries sets the Query History feature running. It can also be turned ON and OFF from the "power" button on the Query History form.

Log Unique Queries Only causes the software to check for duplicates before logging queries.

The AutoBrowse checkbox controls the behavior of the Lookup button on the Lexicon Lookup window. To use the Lookup function, a word (or phrase) must first be typed into the drop-down box above the Lookup button. Clicking the Lookup button then displays any known definitions of the word. If the AutoBrowse checkbox is set ON, some additional lookups may be performed in cases where the original word has defined synonyms. In effect, the entire lexicon will be scanned for other words which share the same synonym, and these will be listed in the Browse panel.

Since the Worksheet window can also be used to type in queries, the Close Query Window on Opening Worksheet option does exactly what it says.

The Apply Spell Check box controls whether or not unknown words will be intercepted by either built-in or custom error handlers. When this box is cleared, there is no error handling. For instance, "List the supliers" will present a message box: Unfamiliar word(s) supliers. Checking this box enables the Access ELF Spelling window to appear, giving the user a chance to correct any mis-typings. In this case, clicking "supplier" and then the Change button fixes the error and allows the translation to proceed normally.

In addition to the built-in Spelling (spellcheck) window, another method of intercepting questions containing words not understood by the system is by applying a Spellcheck script. The Scripted Spell Check check box indicates whether some script in the script library should be used either in place of, or in addition to, the normal spellcheck window. Checking this box will have no effect unless the name of a valid script is first entered into the grey box immediately below the "Scripted Spell Check" checkbox.

Because of the complexity of working with scripts, we've provided the Debug Scripts option as an easy way to trace the values of all variables on entry and exit from scripts attached to ELF processes.


Responses                                                   Settings Tab 2

The Reply Style Option allows you to select the manner in which you'd like Access ELF to respond.

Datasheet is the quickest, most compact response.

You might prefer to view the answer to your query row by row. You can do this by selecting the Autoform option. Autoform uses the built-in Access Form Wizard to produce a simple tabular form that displays a single record at a time.

If you select the Custom reply style, the Form Style buttons become active. This allows you the same degree of flexibility in designing your forms that the Form Wizard permits. Note that for these options to work properly, the Access Wizards must be available as libraries. If the Wizards are not installed (or become uninstalled), you'll need to rerun the Microsoft Access installation, choosing Advanced Wizards to recover this capability.

You can also select the "Transparent Fields" option, which greys out text fields unless the cursor is moved into that field; whereupon the field background becomes white.

The Graph Reply style lets you can request a graph without working it into the wording of your question. Instead of asking "Graph the number of customers from each country." you can simply click Graph, and ask "How many customers are there in each country?"

The automatic graphs will resize themselves as their windows are resized, and can be sorted or limited to the "top N" by using controls on the form footer. You can also enter your own filter, referring to the graph label as "L" or the graph value as "V". Two examples are given, one restricting the labels to those starting with alphabetic characters (L >= "A" and L <= "Z"), and one enforcing positive graph values (V > 0). The first is actually written: L Like "[A-Z]*", which demonstrates how you can use patterns for filters. If you want to eliminates all but labels which start with the letters A-C, you can type: L Like "[!A-C]*"

There are currently three distinct styles of graph supported, Pinnacle, Microsoft Graph 5, and Microsoft Graph 6. Each behaves in a different way, and has different strengths and weaknesses. All three styles allow you to display the graph full-screen. For Pinnacle and Graph 6, click the lower-left X to hide the controls, then maximize the window. For Graph 5, right-click the graph and maximize.

A Microsoft Graph 5-style graph can be completely customized using in-place activation. To do this, double-click the graph. This hides the Access ELF toolbar and changes all menu items to Microsoft Graph options. To return to normal Microsoft Access mode, press escape or click any of the controls below the graph.

Unfortunately,
in-place activation appears to work very spottily with Access XP. Using the Graph toolbar to change graph styles, font sizes etc. may work correctly -- but many of the menu items seem to lock the system. Use the Escape key to return to the Access environment. .

The Pinnacle and Microsoft Graph 6-style graphs have drop-down combo-boxes style selectors. In addition, Microsoft 6 graphs can be rotated using either the "trackball" control, or using Ctrl+mouse combination. Label font sizes and styles can be changed by clicking on the label while holding down the shift key.

Tip 1: When changing to the pie-chart style on the Microsoft graph, you may need to switch from By Row to By Column view.
Tip 2: To graph crosstab queries, resulting from queries such as "Compare the average subtotal for each employee and category.", use the Pinnacle or MS Graph 6 styles. (Include [Order Subtotals] for this example.) Starting with v3.0, you can trigger crosstab queries without the "compare" keyword, by specifying the down and/or across label. For instance, "Give me the total quantities, showing month of order date down and employee name across."

With crosstab graphs, you can also filter on the Legend, by entering a filter expression such as [A-D]*. If the legend were salesperson last name, this would restrict the crosstab graph to showing only those with last names between A and D. (This Legend filter control might not appear at first in the form footer; it may be beyond the right margin. Expand the graph form horizontally to expose this control.)

The Best Guess option provides flexibility for those kinds of data which do not appear to best advantage in the datasheet format. For example, databases that contain photographs or charts (as OLE objects) present these with their OLE class name in datasheet mode, rather than the picture or graph you'd probably prefer. On the other hand, most queries do not involve OLE objects, so it's usually faster and just as complete to use the datasheet mode. Since you don't want to have to keep deciding which to sacrifice, speed or full display capability, we provide the Best Guess option. This option automatically detects the presence of an OLE object in the query response, and presents these responses in Autoform mode; all others are provided in the quicker Datasheet mode.

Version 2.0 introduced two new response styles, Worksheet style and user-defined (or "My Reply Styles"). In their own way, both of these represent huge advances in the state of the art of database query.

The user-defined form style lets you use nearly any Microsoft Access form as a display vehicle for your query. Of course, the query should have something to do with the fields displayed by the form. But the fields don't need to be individually named or otherwise selected. Access ELF will take care of all the details of reading the source fields for the controls on your form (and that includes calculated controls). It will create a query which uses the conditions you specify in the question, plus all the fields required by the form, and package them into one neat SQL statement (as usual, possibly relying on earlier SQL statements which it will also create).

For example, if we type show the German companies using form Suppliers as a question, using the Northwind database, the response looks like this:

(See
Web site for expanded Help application including graphic images.)


If instead we type show the German companies using form Customers, the response looks like this:

(See Web site for expanded Help application including graphic images.)

The reason we need to say "nearly" any form, is that there are still some cases we can't handle. Forms which include subforms that have secondary record sources are still off limits. Another obvious limitation is that Access ELF must be aware of the record source used by the form; that is, it must have been included in the Analysis when building the interface. An easy way to tell whether the form's record source is recognized is to select it from the drop-down box in the My Reply Styles section. If the form's record source isn't recognized, Access ELF will warn you with an error message.

However, forms are built and changed all the time, so this feature is meant to work "on-the-fly", reading the current forms and their definitions. Because these attributes are not predefined as part of the query interface (and because the names of forms are very often composed of words which are used in other contexts) Access ELF may not immediately recognize that you are requesting a given form, even if you use the "using form X" syntax. Alternatively, you can check the Use As Active Form checkbox after selecting the form you want to activate. Another method is to move the Form into the Favorites list (using the Add Favorite button). Once a form is defined as a Favorite, you can give it a unique alias. For example, we can choose the Customer Phone List form, add it to the Favorites list, switch to favorites view and add an alias "CustPhones" for the form.

Now it's a snap to open the form using the new alias. We just enter show the German companies using form CustPhones:

Yes, everything still works as designed on this form, including the selector buttons!

You can also use the query box to set the active form, or reset the response style back to the regular mode. For instance, Show the German companies, making form CustPhones active will both trigger the CustPhones response style and make it the Active Form. So now you can simply type Show the French companies If you next enter show the French companies, making form CustPhones inactive, of course it will have the opposite effect, deselecting user-defined mode and returning the response as a simple datasheet (assuming you are in Datasheet mode). Finally, you can also enter instructions such as Make form CustPhones active. or Make form CustPhones inactive. The status line will echo the command for verification, eg. [Active form set to CustPhones.]

There isn't currently a lot of variation permitted in the way you express these commands. Most currently available syntax is expressed in the following list (vertical bar indicates alternates, braces indicate optional word):
Set|Use form X
Set|Make form X active
Set X as {the} active form
Make X {the} active form

Set|Make form X inactive
Clear {the} active form

Here are some "did you know"s about the Worksheet:

Did you know . . . That you can double click on any LEFT, RIGHT or INNER join expression in the SQL window to cycle through the choices? (Also true in the SQL Translation window.)

That you can activate hierarchies (tree displays), for instance for an organizational chart, just by using the Verb Mapper tab to connect the two fields defining the hierarchy?

That you can split the display into grid and graph by using the option buttons, then size each half of the display by dragging the "sizer" button to the right or left?

That if you right click on a hierarchy button, you can split the grid into a grid+tree display (so you can have grid/tree & graph all going at once).

That you can double-click on any field to "drill-down" -- this runs a new query that shows the associated records. For instance, you might want to drill down from the COUNTRY field to get a breakdown by STATE. To do this, use the Verb Mapper to associate COUNTRY with STATE, using the Verb "DRILL".

That you can export any section of the worksheet to Excel; just highlight the rows and columns you want (use the shift key while clicking).

The Worksheet style response is a large topic unto itself. Please see the Worksheet help page for complete details.

Other options on the Responses Tab of the Settings window include the BestFit Columns check box, and the MakeTable selectors. The BestFit check box determines whether Access ELF will resize the grid columns on the datasheet (and Worksheet data grid) responses. If set On, ELF will try to scale the column widths to its best guess of the length of the longest data (and/or the column header). This is not fool-proof; it's based on the first 20 or so records returned by the query.

The MakeTable option allows you to specify the name of a table which will be generated to hold the answer to your question. By default, responses are returned as queries, which are temporary objects. If you want to save this off as a permanent copy, you can use the MakeTable feature. This would have the same effect (although it's somewhat easier) as switching the response query into design view, and walking through the Make Table dialog.



Views                                                   Settings Tab 3

The Views tab shows all of the interfaces (Views) currently defined for the active database. You can load a View by clicking on its name in the Available Views listing.

You can create more than one view for any database. In fact, it's highly recommended that you pick a small subset of tables for each view. Think of it like this: you wouldn't try to represent your entire business in a single spreadsheet; same goes for natural language views. Break down your database into logical sections and create a view for each one.

You can run any number of Analyses, using a different set of tables, queries and startup options, giving each one a unique name. These can be as specific as you like; for instance, only using information from a small set of tables.

Now, how do you decide which view to use? Starting with version 3.0, you can actually set up the system to decide which view to use depending on the question typed in. You can write a program in VBScript (or JScript) which selects the view based on the question, the user (or the time of day, or anything else you can program!). Click Help from the Scripts Tab for more information on Scripting.

You can also let the user choose the view from the Views tab (as in prior versions) or you can write "hooks" to the various views into your application. For instance, from some point in your app (like the OnLoad event of a given form), you can trigger the loading of the required View with a single line:
result=elfOpenView("MyViewName")
(where MyViewName is the name of the predefined view).

Dim CurrentView As String
Dim result as Integer

     CurrentView="MyView"
     result=elfOpenView(CurrentView)

Either "MyView" or "MyView.ELF" is acceptable as a parameter to the function. You don't need to specify the location; the current setting of the Search In box is used. In the unlikely event that you're switching between Views located in different physical locations (a practice which isn't recommended) you can programatically change the setting of the Search In box by using the Subroutine elfSetDirectoryPath(PathSpec). For example,

     elfSetDirectoryPath "f:\\apps\interfaces"
     result=elfOpenView("MyOtherView")

The value returned by the elfOpenView() function is True if the interface was loaded successfully, otherwise False.

You can also do this same thing from within Question scripts, to reset the View depending on the user and/or his question. From scripts, the two functions work exactly the same, but are called SetDirectoryPath and OpenView respectively (not "elfSetDirectoryPath" and "elfOpenView").

Before leaving this topic, let's review why the ability to define Views is so important. Possibly the most serious mistake to fall into when defining an ELF interface is to throw "everything but the kitchen sink" into the definition. (We may encourage this by providing the Express Analysis option which does just that.) But remember that the more database structures you include in a given interface, the higher the probability of conflicts between different uses of the same word. Now of course, if any expected query is going to require data from a number of different tables, all at the same time, then it's necessary to include them all in a given view.

Before version 3.0, you had no way of knowing whether the user would be asking questions about products, say, or customers, or shipments, at a given point in the program. You had no choice but to to include them all in one heaping mass of interface. This is no longer true. With the advent of scripting, you (or more to the point, your script!) can get access to the user's question and decide right then and there what's the topic of conversation. Since you also know who's asking the question (just consult the UserID variable) you can tailor scripts that reach a hitherto unknown level of customizability.

The Views tab also contains an option box which allows you to switch between Jet 3 (Access 97), Jet 4 (Access 2000) and SQL Server 7.0 dialects. The system will automatically select the one appropriate for your database. However, it's nice to have the option to get a translation into another dialect, just by clicking a button. In some cases the same SQL will be generated; more often, the SQL generated is specific to the system selected. You'll only get interesting error messages by trying to pass SQL Server SQL to Microsoft Access. If you use this feature to get "foreign" SQL translations, be sure to uncheck the "Pass through" box on the Query window, so that SQL is generated but not processed.

The Views tab shows all of the interfaces (Views) currently defined for the active database. You can load a View just by clicking on its name in the Available Views listing.

You can also choose to see all Views presently located in the Search In directory, whether or not they're related to the currently open database. Clear the Show Views Matching this Database only checkbox for this more comprehensive overview.

One special use of this option is in finding and loading Views that were created at a replication copy, for use (or debugging tasks) under the replication Master.



Verb Mapper                                                   Settings Tab 4

The Verb Mapper allows you to associate an action word with the relationship between two tables (or between a table and an Analyzed query). For example, we can associate the verb "handle" with the link between Employees and Orders. It's as easy as typing the word handle into the box between the two tables, so that it reads across "Employees handle (s) Orders". If the relationship should read in the other direction, use the Flip button to invert. You can, if it makes sense, define separate verbs for the relationship in each direction.

The relationships don't have to be direct table-to-table (or table-to-query). You can define relationships between datasets that have indirect relationships. To add a new Verb Mapping, click the New Record indicator (arrow star) on navigation control, or just keep advancing to the next record until the "Define A Relationship to Associate with a Verb" dialog box appears. You can then select a table from Column A and one from Column B, for instance Customers and Products. Rather than displaying the keys, as it does for direct joins, the join boxes will display the tables used to link the two data sets; in this case Orders and Order Details. Now we can define the following: Customers enjoy(s) Products and (after clicking the "Flip" button) Products satisfy(s) Customers.

After making these definitions, Access ELF will understand questions such as "Who enjoys Gumbo Mix?" and "What satisfies Handel?" (you guessed it: Gumbo Mix!)

You can display hierarchies in the Worksheet by using the Verb Mapper to let ELF know about hierarchical relationships -- such as organizational structure (who bosses who) or parts-dependencies. To do this, add an entry to the Verb Mapper by using the Add New record button (arrow and star). Choose the same table on both sides of the relationship. Click a field on the left, for instance [Employee ID], and a field on the right, for instance, [Reports To]. Now you can use the Hierarchy buttons in the worksheet to get a tree display. Or use "as a hierarchy" in your question, to display records in hierarchical order.

Tip: Be careful when using this function to click on actual key values, not -- by accident -- other numeric fields. This instructs ELF to ignore these fields when creating graphs; and deleting the reference later won't restore "graphability."

Another use for the Verb Mapper is for linking fields which you want to display togather. Let's say that every time you display the "Document" field, you want to also display "Case ID". Add a Verb Map entry using the verb "IMPLY". The two fields can come from the same, or from different tables. Now, whenever you see Document in the response, Case ID will be there too.

(Note: if the two tables are related, Access ELF will fill in the relationship in the place where you want to select the fields to relate. To override, just type in the verb IMPLY, then double-click one of the fields pre-selected by the program. This will unlock the list of fields in each table so that you can click one on each side.)

You can also use this feature to relate two fields using the special verb "drill". This defines a drill-down relationship; which means if you double-click in the Worksheet on a data item from one field, Access ELF will run a query showing related values from the other field. Typical would be to relate COUNTRY to STATE by "drill' so that double-clicking on "USA" would break down the displayed values state-by-state.



Advanced                                                   Settings Tab 5

The next-to-last tab is where we've placed some of the less common customizations, as well as administrative functions such as import/export of Views and lexicon maintenance.

The Scripting Language radio button selects between VBScript and JScript. This selection applies to all scripts in the script library. Script languages can't be mixed within a View, but if you use JScript for some Views and VBScript for others, see this note on changing the script language choice upon loading a View.

The Import/ Export ELF Interface buttons should make swapping interfaces a breeze. You can copy a .ELF folder to a network drive or floppy disk in just a few clicks. From there it can be zipped and emailed (or just hand-delivered) and your friends or customers can import the unzipped folder into their own Access ELF installation.

There are no licensing changes, redistribution charges or royalty charges for distributing Access ELF interfaces. Once you've created a natural language query system for your Access database or application, it can be used without charge by anyone you wish. To use your interface, users simply download the free Access ELF program (v4.0 or above) . They don't need to purchase a license, because the license is transmitted along with the interface (.ELF folder) you provide them with. This license includes the ability to use each and every feature of the software -- except the ability to create new interfaces for their own databases. (They can still adapt the interfaces shipped with your application using any of the customization features.)

Check Lexicon Size allows you to measure how full the lexicon has become. The lexicon is a disk file which uses a "hash" technique to ensure quick access. It should always have at least 50% free space to provide best performance. Access ELF usually does a good job of estimating the amount of hash space required for a given database, but in some cases it may miscalculate. This button lets you verify that the free space it within acceptable limits. If more space is required, you'll need to rerun the Analysis, manually overriding the AutoSelected dictionary size (increasing the value).

The Synchronize Lexicon button scans through your database, checking for any vocabulary that's been added since the last analysis performed. If you've added a new record for "Bob Smith", Access ELF needs to know, so that it can handle questions like "What's Bob Smith's phone number?" Of course, if your database is small enough, running a complete analysis from scratch is no problem, especially if you've saved any configuration choices with the Save button on the Custom Analysis window. But with larger databases, you may be able to save some time by just re-synching the one or two most volatile tables, instead of re-analyzing the whole database.

The MDB, Table and Field buttons on the Table/Field Source window launched by the Synchronize button offer three different "bite-sizes" for re-synching ELF's lexicon with your current database contents. Note that you can also use this sync feature to "un-exclude" a given field's data from the lexicon. That is, if the Mem (Memorization of vocabulary) box was checked off during a Custom Analysis, but you've changed your mind and now want to include all the text from this field, use Field Synchronization and answer Yes during the override dialog.

The Delete Analysis Table button removes the elfAnalysis table associated with the current View. This table is created at the time that a custom analysis is performed with the Save Analysis checkbox marked. The table is used to store the individual decisions made by the automatic inetrface generator for later inspection (and/or customization) with the Analysis Editor. (The location of the table is the Custom.mdb file stored into the .ELF folder of the created View. ) Once this table has been generated, launching an analysis causes a prompt message to inquire whether the stored (and possibly modified) decisions should be incorporated into the current analysis. If no hand-modifications have been made, this table may no longer have any purpose, so the Delete Analysis button provides a one-click method of removing it from the View.

The ShowWarnings checkbox determines whether warning message boxes will be active or suppressed. Warning boxes come from two different sources. They can be generated by the program when the Permit Rewordings and Warn on Rewordings options are set. This will inform the user that the question may or may not not have been fully understood -- a "backup" system for handling partially-undertood questions was used Otherwise, the only warning messages will come from scripts that you write. You can trigger warning messages to appear by setting the WarningCode variable to a non-zero value and the WarningString variable to your message.

The Debug Break checkbox will be mostly of interest to developers who like to open the hood and look inside at the software engine. With the Break box checked, Access ELF will open a window into the running library code (elf32.mda) whenever a question is sent. This allows you to trace into the code to examine its inner workings. Breaking into running code can also be accomplished with the <Alt-F11> key combination.

Access ELF uses a statistical sampling method during the analysis process, while trying to answer various questions about the relationship of fields with one another. While this method is usually fairly accurate, it's possible that some cases might require looking at the entire table. With version 4.0, we've added this option to allow administrators to force the analysis to examine each row of each table when deciding these questions.

Note that for large databases, turning off the Use Statistical Sampling option will markedly increase the running time of an analysis.

Max translation time lets administrators of Access ELF installations set a predetermined time-out for query processing. Normally, when Access ELF is going to understand a question, it does so relatively quickly. What's frustrating is that it can take an unreasonable amount of time to fail. A good compromise is to set some time limit -- for instance 30 seconds -- automatically cancelling queries that don't yield an answer in that time.

Setting this value to 0 allows the translation to runs its full course without interruption.

The Query Prefix applies to temporary queries that Access ELF writes when answering your questions. You can change this prefix to one of our own choosing. (Since these queries appear in the user's database container, you may prefer query names that remind the end-user of your company, not ours.) On networked databases, which can be opened by more than one user at a time, Access ELF will detect multiple users and add a unique 1-character tag after the query prefix for each user. For instance, the second user on the system might see his queries as elfQX1, elfQX2 etc. If you're on a single-user system and are getting these extra characters, clean out the elfQuerySession table in ELF32.MDA. (This table should clean out inactive entries about every 12 hours, automatically.)

Because it's annoying to get that "Sorry, unable to interpret the question." message box, many users requested that they be able to tailor the message to suit their application. Now it's just a matter of entering the Default "Sorry" message on the Advanced Tab.

Remember that can also define specific error messsages to show in response to particular words or phrases in the question. Do this by preceding a lexical phrase definition with an exclamation point. For instance, you can pop-up a message that says "We don't allow profanity here" if the user types in a word on your list of undesirables. The header for the column in which this message will appear can be defined in the phrase definition itself (following a semi-colon).
When I Type: !hell     I Really Mean: We don't allow profanity here;Stern Rebuke to User

If you don't specify a header within the error text, then whatever appears in the Default Custom Error message header" textbox will be used. And if no message is supplied, the header will read "We regret to say:" (We're sure you can do better than that!)

In fact, this has a more serious purpose than the example might indicate. This feature should prove very helpful in guiding the questioner away from topics which aren't covered by your database or View, and steer them back toward the kinds of information you do make available. And of course, as we describe thoughout the documentation, scripts have even more power to tailor these custom messages. For instance, you could write a Phrase script that fires when "hell" is detected, but examines the rest of the query to see whether it's in regard to "Cajun Hell Pepper Sauce". For more on this, see Answer Scripts.



Scripts                                                   Settings Tab 6

The final tab (not shown) is where scripts used by all of Access ELF's scripted components must be saved. (Sorry, we're still using old screenshots!) You can also use the script window to edit you scripts in-place, although this is somewhat clumsy. Slightly better is using the Zoom box (Shift-F2) to give yourself more working room for script editing. We generally prefer to tinker with scripts in a text editor such as Notepad, then cut-and-paste into the Scripts panels when ready to use (or test) them.

There are 5 types of scripts that can be used in Access ELF. To summarize, there are:
Analysis scripts which automate any post-analysis customizations required.
Question scripts which intercept the input (or question) from the user.
Answer scripts which intercept the SQL generated by the interface.
Phrase scripts which intercept the question ONLY IF the specified phrase is contained in the input.
Spellcheck scripts which are triggered when one or more words in the input are unrecognized.

In each case, the script must be placed in the Script repository prior to being registered with Access ELF. If the script does not already appear in the repository under the name you are trying to use to register it, a warning message will trigger when you click the activation checkbox.

Except for Phrase scripts, all scripts are registered by typing their name into the scriptname box, then checking the script option checkbox.
Spellcheck scripts are registered on the Preferences tab.
Analysis, Question and Answer scripts are registered on the Views tab.
Phrase scripts are registered by typing their name into the ScriptName column of the associated phrase in the Phrases window

The ScriptName is both the identifier of the script panel entry (for example, when #INCLUDEing one script panel into another) and the name of the function within that script which will be called when the script is triggered. For this reason, most script panels will contain a function which has the same name as the script itself. An exception to this might be a script panel which contains utility functions that are included in one or more other scripts. In that case, since the script won't be referenced directly (and isn't registered in any of the four ways described above), it would have no need of a "namesake function".

For more details on how scripts can be put to use, see the Scripting section as well as VB ELF Compatibility Enhancements Detailed examples are available for Analysis scripts, Question scripts, Answer scripts, Spell scripts and Phrase scripts.


Last Updated: August, 2009