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.
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 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: August, 2009