# | Name | Location | Type | Details | Index | Description |
---|---|---|---|---|---|---|
.01 | order number | 0;1 | NUMERIC | B | Answer must be the order number of this cross-reference value. FileMan evaluates cross-reference values by order of "Order Number" and places each value in the X(order#) array. The set and kill logic, for example, can use X(2) to refer to the cross-reference value with order number 2. | |
.5 | subscript number | 0;6 | NUMERIC | If this cross-reference value is used as a subscript in an index, enter the subscript position number. The first subscript to the right of the index name is subscript number 1. | ||
1 | type of value(+) | 0;2 | SET OF CODES | F:FIELD C:COMPUTED VALUE | Answer 'F' if this cross-reference value is based on the value of a field. Answer 'C' if this cross-reference value should be determined by executing the COMPUTED CODE. | |
2 | file | 0;3 | NUMERIC | If this cross-reference value is a field value, answer with the number of the file or subfile in which this field is defined. | ||
3 | field | 0;4 | NUMERIC | If this cross-reference value is a field, answer with the field number. | ||
4 | computed value | 1;1 | FREE TEXT | If this cross-reference value is computed, answer with the computed expression that evaluates to it. | ||
4.5 | computed code | 1.5;E1,245 | FREE TEXT | Answer with M code that sets X equal to the cross-reference value. The X(order#) array is available for those cross-reference values with lower Order Numbers, and the DA array describes the IEN of the current record. | ||
5 | transform for storage | 2;E1,245 | FREE TEXT | Used only when setting or killing an entry in the index. Answer should be M code that sets the variable X to a new value. X is the only input variable that is guaranteed to be defined and is equal to the internal value of the field. TRANSFORM FOR STORAGE can be used on field-type cross-reference values to transform the internal value of the field before it is stored as a subscript in the index. If a match is made on this index during a lookup, then in order to properly display the resulting index value to the user, the developer may need to enter code into the TRANSFORM FOR DISPLAY field to transform the index value back to a displayable format. | ||
5.3 | transform for lookup | 4;E1,245 | FREE TEXT | Used only during lookup. Answer should be M code that sets the variable X to a new value. X is the only input variable that is guaranteed to be defined and is equal to the lookup value entered by the user. During lookup, if the lookup value is not found in the index, FileMan will execute the TRANSFORM FOR LOOKUP code to transform the lookup value X. It will then search this index looking for a match to the transformed lookup value. | ||
5.5 | transform for display | 3;E1,245 | FREE TEXT | Used only during lookup. Answer should be M code that sets the variable X to a new value. X is the only variable that is guaranteed to be defined and is equal to the value of the subscript from the index. TRANSFORM FOR DISPLAY should be set only for an index value that has been transformed using the code in the TRANSFORM FOR STORAGE prior to storing the value in the index. The code should take the internal value from the index subscript X, and convert it back to a format that can be displayed to an end user. During lookup, if a match or matches are made to a lookup value that was transformed using the TRANSFORM FOR LOOKUP code on this index, then FileMan will execute the TRANSFORM FOR DISPLAY code before displaying the index value(s) to the end user. | ||
6 | maximum length | 0;5 | NUMERIC | Answer must be the maximum length this cross-reference value should have when stored as a subscript in the index. FileMan's lookup utilties account for lookup values longer than the maximum length. Specify a MAXIMUM LENGTH when an untruncated subscript may cause the length of a global reference in the index to exceed the M Portability Requirements. | ||
7 | collation | 0;7 | SET OF CODES | F:forwards B:backwards | Answer with the direction FileMan's lookup utilities should $ORDER through this subscript when entries are returned or displayed to the user. If for example, you have a compound index on a Date of Birth field and a Name field, and you specify a COLLATION of 'backwards' on the Date of Birth value, the Lister and the Finder will return entries in reverse-date order. Likewise, question mark (?) help and partial matches in interactive ^DIC lookups will display entries in reverse-date order. | |
8 | lookup prompt | 0;8 | FREE TEXT | The text entered here will become a prompt for the user when this index is used for lookup (i.e., in the Classic FileMan calls to ^DIC.) If the text is missing, then the FIELD LABEL will be used as a default. |
Error: Invalid Global File Type: .114