|Contents:||Main||Chapter||See Also:||Getting Started Manual||Advanced User Manual|
Each entry in a file corresponds to a positive-valued key subscript, the internal entry number, of the file global. All data pertaining to an entry will be stored in global nodes descendent from that subscript. The value of the .01 field of an entry is always stored in the first ^-piece of subscript zero, descendent from the internal entry number subscript. Thus, for entry #1, an employee named John Jones, you would have:
Suppose you want to store the employee's sex in the second ^-piece of subscript zero, and date of birth in the third ^-piece, and department in the fourth ^-piece. You would have:
Notice that the entry for the employee's department in this file is a number. This means that the employee's department is internal entry number 3 in the Department file; and to find the employee's department, you would have to consult that file. The 7-digit number representing the employee's date of birth is FileMan's way of internally representing 12/25/1934.
How is multiple-valued data, such as skill, stored? There can be one or five or ten skills on file for a given employee and they obviously cannot all be stored (in the general case) in a single subscript. VA FileMan's answer is to make the skills list a subfile within the employee entry. This requires adding subscripts beyond the first internal key subscript which are different in value from the zero subscript that stores each employee's name, sex, and birth date. For example, if John Jones currently has two (free-text) skills on file, you can consider those to be entries #1 and #2 in a two-entry file, which can extend at a lower level from any unused subscript, say from SX as shown below:
^EMP(0)="EMPLOYEE^3I^9^3" ^EMP(1,0)="JONES,JOHN^M^2341225^3" ^EMP(1,"SX",0)="^3.01A^2^2" ^EMP(1,"SX",1,0)="TYPING" ^EMP(1,"SX",2,0)="STENOGRAPHY"
Notice that the data global ^EMP has ^EMP(1,"SX",0) for the skill multiple. The zero node, except for the first ^-piece, has the same structure as ^EMP(0). The second ^-piece is the subfile ^DD number. This tells FileMan which subsidiary dictionary to use for the data stored in this node. The actual data (the employee's skills in our example) are stored in the next lower level of subscripting. In the same manner that entries in the EMPLOYEE file have internal entry numbers, entries in the multiple field also have internal entry numbers in the subfile. In the example above, TYPING is the first entry and STENOGRAPHY the second.
Reviewed/Updated: March 10, 2007