Contents: | Main | Chapter | See Also: | Getting Started Manual | Advanced User Manual |
The M capabilities of string-valued array subscripting offer a simple, general way to cross-reference VA FileMan files. To minimize the number of global names used by the system, FileMan stores each cross-reference set as a descendent of an alphanumeric subscript of the file's global. A file, such as an EMPLOYEE file, that should be accessible by name, is set up by the system so that there is a subscript "B", which in turn is subscripted by strings corresponding to the first 30 characters from the .01 field for every entry in the file. For each such string-valued subscript, the next level of subscripting contains the internal entry numbers of the entries that contain the name.
Let's add to our previous example a second employee, internal entry number 9, also named John Jones, and a third employee, internal number 7, whose name is Sam Smith. Then you would have:
^EMP(1,0)="JONES,JOHN^M^2341225^3" ^EMP(7,0)="SMITH,SAM^M^2231109^2" ^EMP(9,0)="JONES,JOHN^M^2500803^18" ^EMP("B","JONES,JOHN",1)="" ^EMP("B","JONES,JOHN",9)="" ^EMP("B","SMITH,SAM",7)=""
Notice that all the data is in the subscripting and the global nodes under ^EMP("B") are simply null strings. FileMan allows for these strings to be non-null in the case where a mnemonic cross-reference is set up for the name. Multiple cross-references (C, D, etc.) are also allowed.
In Version 22.0 of VA FileMan, cross-references (indexes) may be defined
that have more than one data field subscript before the record number. These
cross-references can then be used for a lookup and the user will be prompted
for more than one lookup value, one for each data subscript on the index. Such
compound indexes must be defined as a new-style index on the
INDEX
file.
Example: An entry from a cross-reference with the name and the date-of-birth on the data above might look like:
^EMP("C","JONES,JOHN",2341225,1)=""
Reviewed/Updated: March 10, 2007