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 Phrase Controls


The Phrase Trigger is the "When I Type" part of a "When I Type / I Really Mean" phrase definition. It comes in two varieties, Lexical and String. Lexical triggers are unbracketed; string triggers are bracketed. The brackets used can be either square brackets [ ] or quote marks. Lexical triggers are a word or phrase to be matched in the question. Examples of the use of lexical triggers are:

When I Type: Scandanavian     I Really Mean: from Norway, Finland or Sweden
When I Type: sweetmeat     I Really Mean: confection
When I Type: full name     I Really Mean: first name and last name
When I Type: expect     I Really Mean: require

Lexical triggers should be used for single words or short phrases with simple replacement values. These replacements are applied left-to-right as the triggers are matched in the question. Since they apply equally to conjugated forms of words, they should be written in root form; that is, we can replace "expect" by "require" and still have the following substitution work properly.
When was Arquibaldo expecting seafood? => When was Arquibaldo requiring seafood?

Note that without this Phrase definition, the answer will wrongly show the Order Date, not the Required Date.

Lexical triggers can also be preceded by an exclamation point, indicating that when this word or phrase is matched in a question, the error message given in the Phrase column will be displayed in place of any other response. An example is:
When I Type: !sex     I Really Mean: This system does not answer questions about gender.

Some examples of string triggers are:

When I Type: [still in stock]     I Really Mean: not discontinued
When I Type: [surname]     I Really Mean: [ lastname | ContactName ] * employee
When I Type: [how much {ProductName}]    
I Really Mean: [ how much stock of {1} | how much quantity of {1} ] * stock
When I Type: [<= {#} {QuantityPerUnit}]     I Really Mean: at most {#} {1}

String triggers are denoted by brackets around the trigger. They are applied in the order in which they appear in the Phrases list, and this order can be changed by entering arbitrary ordering strings into the Key field. For example, to ensure that one Phrase substitution is applied before another, mark the Key of the first A, and the second B. While lexical triggers work in a straightforward yes/no way (either they fire or they don't), string triggers can behave conditionally based on their associated Phrase value. They can also trigger Phrase scripts, allowing you to fine-tune the actions of an interface in the context of a given word or phrase. Many examples of the use of context-sensitive phrases and Phrase scripts will be found in the Phrase Usage Primer.

Because string triggers fire before lexical triggers, these two types can be used in combination. For instance:
When I Type: [^hi^]     I Really Mean: hello
When I Type: !hello
I Really Mean: Hello, welcome to Northwind Specialty Foods database;Greetings from our staff

The ^ caret symbol is used to mark either the beginning or end of a question, or both. Thus ^hi^ only matches the complete question "hi" -- it doesn't match "hi, show me seafood prices". Another useful fact to know is that trailing spaces are respected:
When I Type: [big ]     I Really Mean: largest {#}

With this rule "Show big prices." will change to "Show largest prices." But "Show biggest prices." won't incorrectly change to "Show largest gest prices." The {#} symbol in the replacement means that the space should be carried along.

The Script Name field is used to connect a string trigger with a script function (of the cited name) in the scripts library (Scripts tab of Settings). If the trigger is not associated with a script, the Script Name column is left blank. The one exception to this rule is when string phrases are meant as implicit function definitions. In this case, the Script Name column can be assigned the value: Function.

The Comments field holds any notes you want to make about the reason for including the given Phrase definition. It is not used by the Access ELF system, simply stored for your convenience. The Kindred field similarly has no effect on the action of the Phrase. It is provided to give users an extra way (besides comments) of indicating sets of Phrase definitions which are intended to work in concert. This can help in selectively transferring Phrase definitions from one View to another.

The Apply and Debug checkboxes are used to test and debug applications using Phrase definitions. All Phrase definitions can be switched off by clearing the Apply box. To see a message box flagging the sequential application of each Phrase definition (that is, each substitution applied to the current question), set the Debug checkbox.

The Import button copies any Phrase definitions which are held in the client database (where they were stored in previous versions) into the Custom.mdb table of the current View, where they are stored in version 4.0. This feature will be of most interest to users of Access ELF 2000 and earlier. However, even new users might be interested in this feature for the following reasons.

One, if you are worried about losing the Phrase definitions you've manually crafted, you'll probably want to back them up. What better place for the backup than in your database? If you place it here (by manually importing it from the Custom.mdb file within the .ELF interface directory), then you'll also be able to transfer it automatically into any newly created View, either using this button or using the AutoImport Phrases option.

Two, if you tend to create several Views of the same database, you may find yourself writing identical Phrase definitions for closely related Views. You can simplify the job by entering these phrases directly into the "back-up" elfPhrases table stored in your .mdb file. Each time an analysis is performed, any phrases found in this table (but missing from the under-construction View) will be copied into that View.


Last Updated: March, 2002