URL: http://www.firstbasesoftware.com/man/man5/xchoice.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]


NAME

xchoice - extended choice file for data entry

SYNOPSIS

Layout of the FirstBase extended choice files

DESCRIPTION

A FirstBase extended choicefile is a file that is used from dbvedit(1) to provide strict control over data entry of a particular field. The idea is that the user does not need to actually type out all of the input for a given field, but rather chooses a selection whose corresponding meaning is then inserted into the field.

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:

$DBASE
The choice database. Must be a valid FirstBase database.

$INDEX
The choice index. Must be a valid FirstBase index, generated from the database indicated by $DBASE. Furthermore, this index MUST be sorted by a superset (or complete set) of all the fields requested in the $FILTERS line.

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).

$FILTERS
The fields from the current database that will be used to generate a search key request for matching choice database records. An error message will display if no extended choice selections fit the contents of the $FILTERS line. Note: these fields are logically related to the architecture of the $INDEX specificed, as detailed above.

$DISPLAYS
The fields from the choice database that will be displayed in a spreadsheet manner during extended choice display. Only records matching the $FILTERS will be displayed.

$RETURN
The one field from the choice database that will be returned when a valid extended choice is selected.

$HELP
A pointer to yet another help file that can be paged to the screen during the extended choice display by use of <CTL>-H or <FUNCTION>-HELP.

$PROMPT
A string value used as the prompt for this extended choice selection. The default value is the same as PROMPT_CHOICEMSG.

"Text Text":row,col
Persistent comments that are mapped to the screen using the standard view dictionary screen text mapping mechanism.

SEE ALSO

dbedit(1), dbdbas(1), choice(5), setup(5)

FirstBase User's Guide and Reference Manual


URL: http://www.firstbasesoftware.com/man/man5/xchoice.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]