URL: http://www.firstbasesoftware.com/man/man5/xchoice.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[
Index of Contents] [
FirstBase RDBMS Overview]
This makes uniform data entry for fields with a set of known values quite easy -- and eases the typing required for long, duplicate entries.
FirstBase extended choice fields behave very much like normal choice fields -- the only difference is the storage location of the choices dbvedit(1) displays to the user. As explained in choices(5), normal choice selections are stored directly in the choicefile itself.
However, for extended choice fields, the choices are stored in a standard FirstBase database, and are accessed using a FirstBase index. Maintenance of the stored choices themselves becomes a simple database task using this feature.
Another feature of extended choices is fields from the current database are used to filter the choices presented during extended choice display. This feature allows the use of very large databases of choice selections which are filtered into a small subset of choices displayed during the actual extended choice selection.
Additionally, there is a setup variable, EX_FORCEONE, which, if set to ON, will cause the extended choice mechanism to force the choice selection when there is only a single choice to choose from.
The extended choicefile is really a data dictionary extension of the standard database dictionary. Inside of the extended choicefile are pointers to the choice database and index, display fields, filter fields, a return field, and optional comment and helpfile lines.
The following is a list of the lines in an extended choicefile:
a) $DBASE dbase b) $INDEX index c) $FILTERS local-field [local-field ...] d) $DISPLAYS choice-database-field [choice-database-field ...] e) $RETURN choice-database-field f) $HELP helpfile g) $PROMPT Prompt_String h) "Text Text Text":row,col
Here is an explanation of each of the sections:
For example, if you want to filter by FieldA and by FieldB, then the choice database itself should contain FieldA and FieldB, and the choice database index should be generated (dbigen(1)) so that the result is sorted by FieldA then by FieldB (in that order).
FirstBase User's Guide and Reference Manual