| 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, VA FileMan stores each cross-reference set as a descendent of an alphanumeric subscript of the file's global. A file, such as a (fictitious) 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.
Adding to the previous example (Section 21.5) a second employee, internal entry number 9, also named THREE FMEMPLOYEE, and a third employee, internal number 7, whose name is ONE FMEMPLOYEE. Then you would have:
Figure 362: Cross-References—Sample File Entry with Multiple Records
^EMP(1,0)="FMEMPLOYEE,THREE^M^2341225^3"
^EMP(7,0)="FMEMPLOYEE,ONE^M^2231109^2"
^EMP(9,0)="FMEMPLOYEE,THREE^M^2500803^18"
^EMP("B","FMEMPLOYEE,THREE",1)=""
^EMP("B","FMEMPLOYEE,THREE",9)=""
^EMP("B","FMEMPLOYEE,ONE",7)=""
Notice that all the data is in the subscripting and the (fictitious) Global nodes under ^EMP("B") are simply NULL strings. VA 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 VA FileMan, cross-references (indexes) can 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 is 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(#.11) file.
Figure 363 is a sample cross-reference entry with the name and the date-of-birth on the data in Figure 362:
Figure 363: Cross-References—Sample Entry with Additional Data Fields
^EMP("C","FMEMPLOYEE,THREE",2341225,1)=""
Reviewed/Updated: May 2026