Files > INDEX

name
INDEX
number
.11
location
^DD("IX",
description
This file stores information about new-style cross-references defined on a file. Whereas traditional cross-references are stored under the 1 nodes of the ^DD for a particular field, new-style cross-references are stored in this file and can consist of one field (simple cross-references), as well as more than one field (compound cross-references).
Fields
#NameLocationTypeDetailsIndexDescription
.01file(+)0;1NUMERICBAnswer should be the number of the file cross-referenced by this index. For whole file cross-references on subfiles, answer with the number of the file where the index physically resides, not the subfile number.
.02name(+)0;2FREE TEXTAnswer must be the name of the index. For example, the name of the default lookup index on a file's .01 field is B, the name of the uniqueness index of a compound key is BB, and the name of an index not used for lookup must start with A.
.1description.1;0WORD-PROCESSING
.11short description(+)0;3FREE TEXTAnswer should be text briefly explaining the function of this cross-reference.
.2type(+)0;4SET OF CODESR:REGULAR
MU:MUMPS
REGULAR - One or more field values are stored in an index on the file. The index can be used for sorting, or optionally, looking up entries. MUMPS - Customizable M code executes whenever a field that makes up the cross-references changes.
.4execution(+)0;6SET OF CODESF:FIELD
R:RECORD
Answer with the code that indicates whether the cross reference logic should be executed after a field in the index changes, or only after all fields in a record are updated. The logic for most simple (single-field) indexes should be executed immediately after the field changes, and so should get the code 'F'. The logic for most compound indexes should be executed only once after a transaction on the entire record is complete, and so should get the code 'R'. Exceptions to this rule are rare.
.41activity0;7FREE TEXTAnswer with the flags that control whether FileMan fires this cross-reference during an installation and a re-cross-referencing operation. The possible flags are: I = Installing an entry at a site R = Re-cross-referencing this index FileMan automatically fires cross-references during an edit, regardless of Activity, though you can control whether a cross-reference is fired by entering Set and Kill Conditions. Also, if you explicity select a cross-reference in an EN^DIK, EN1^DIK, or ENALL^DIK call, or in the UTILITY FUNCTIONS/RE-INDEX FILE option on the VA FileMan menu, that cross-reference will be fired whether or not its Activity contains an "R".
.42use0;14SET OF CODESLS:LOOKUP & SORTING
S:SORTING ONLY
A:ACTION
LOOKUP & SORTING - The index name starts with "B" or a letter that alphabetically follows "B". Calls to Classic FileMan lookup (^DIC) or the Finder (FIND^DIC or $$FIND1^DIC) where the index is not specified will include this index in the search. The index will be available for use by the FileMan Sort and Print (EN1^DIP). SORTING ONLY - The index name starts with "A". Calls to Classic FileMan lookup (^DIC) or the Finder (FIND^DIC or $$FIND1^DIC) will not use this index unless it is specified in the input parameters. The index will be available for use by the FileMan Sort and Print (EN1^DIP). ACTION - The index name starts with "A". This is used for M code that performs some actions and does NOT build an index. Therefore, it is not available for use by either the Classic FileMan lookup (^DIC), the Finder (FIND^DIC or $$FIND1^DIC) or the Sort and Print (EN1^DIP).
.5root type0;8SET OF CODESI:INDEX FILE
W:WHOLE FILE
Answer 'I' if the fields that make up the file are defined at the same level at which the index is located. Answer 'W' if this is a whole file cross-reference in which the fields that make up the index are defined in a subfile, but the index is physically located at a parent file level.
.51root file(+)0;9NUMERICACAnswer with the number of the file or subfile where this index is defined. For whole file indexes, answer with the subfile number, not the number of the file where the index physically resides.
1.1set logic(+)1;E1,245FREE TEXTAnswer with the M code that FileMan should execute when the values of fields that make up the cross-reference are set or changed. When field values are changed, FileMan executes first the KILL LOGIC, then the SET LOGIC. Assume the DA array describes the record to be cross-referenced, and that the X(order#) array contains values after the transform for storage is applied, but before the truncation to the maximum length. The variable X also equals X(order#) of the lowest order number. When fields that make up a cross-reference are edited and the kill and set logic are executed, the X1(order#) array contains the old field values, and the X2(order#) array contains the new field values. If a record is being added, and there is an X1(order#) array element that corresponds to the .01 field, it is set to null. When a record is deleted, all X2(order#) array elements are null.
1.2overflow set logic1.2;0MULTIPLE.111
1.3set condition1.3;E1,245FREE TEXTAnswer with a FileMan computed expression that will evaluate to Boolean true (according to the M rules for Boolean interpretation). FileMan will evaluate this expression whenever it would normally execute the cross-reference's Set Logic, and will not execute the Set Logic unless this condition evaluates to true.
1.4set condition code1.4;E1,245FREE TEXTThis is MUMPS code that sets the variable X. The SET LOGIC is executed only if the SET CONDTION, if present, sets X to Boolean true (according to M rules for Boolean interpretation). Assume the DA array describes the record to be cross-referenced, and that the X(order#) array contains values after the transform for storage is applied, but before the truncation to the maximum length. The variable X also equals X(order#) of the lowest order number. When fields that make up a cross-reference are edited and the kill and set conditions are executed, the X1(order#) array contains the old field values, and the X2(order#) array contains the new field values. If a record is being added, and there is an X1(order#) array element that corresponds to the .01 field, it is set to null. When a record is deleted, all X2(order#) array elements are null.
2.1kill logic(+)2;E1,245FREE TEXTAnswer with the M code that FileMan should execute when the values of fields that make up the cross-reference are changed or deleted. When field values are changed, FileMan executes first the KILL LOGIC, then the SET LOGIC. Assume the DA array describes the record to be cross-referenced, and that the X(order#) array contains values after the transform for storage is applied, but before the truncation to the maximum length. The variable X also equals X(order#) of the lowest order number. When fields that make up a cross-reference are edited and the kill and set logic are executed, the X1(order#) array contains the old field values, and the X2(order#) array contains the new field values. If a record is being added, and there is an X1(order#) array element that corresponds to the .01 field, it is set to null. When a record is deleted, all X2(order#) array elements are null.
2.2overflow kill logic2.2;0MULTIPLE.112
2.3kill condition2.3;E1,245FREE TEXTAnswer with a FileMan computed expression that will evaluate to Boolean true (according to the M rules for Boolean interpretation). FileMan will evaluate this expression whenever it would normally execute the cross-reference's Kill Logic, and will not execute the Kill Logic unless this condition evaluates to true.
2.4kill condition code2.4;E1,245FREE TEXTThis is MUMPS code, that sets the variable X. The KILL LOGIC is executed only if the KILL CONDITION, if present, sets X such the X evaluates to true, (according to M rules for Boolean interpretation) Assume the DA array describes the record to be cross-referenced, and that the X(order#) array contains values after the transform for storage is applied, but before the truncation to the maximum length. The variable X also equals X(order#) of the lowest order number. When fields that make up a cross-reference are edited and the kill and set conditions are executed, the X1(order#) array contains the old field values, and the X2(order#) array contains the new field values. If a record is being added, and there is an X1(order#) array element that corresponds to the .01 field, it is set to null. When a record is deleted, all X2(order#) array elements are null.
2.5kill entire index code2.5;E1,245FREE TEXTThis is a kill statement that can be executed to remove an entire index for all records in a file. When an entire file is reindexed, FileMan executes this code instead of looping through all the entries in a file and executing the kill logic once for each entry.
11.1cross-reference values11.1;0MULTIPLE.114
666re-indexingNOREINDEX;1SET OF CODES1:NO RE-INDEXING ALLOWED
0:ALLOW REINDEXING
If you answer '1', this cross reference will not be re-indexed during a general re-indexing of this file, whether it's done via API or interactively. If you answer '0', which is the default, it will. A 'NO RE-INDEXING' cross-reference will ONLY be re-indexed if it is specifically named in an API call

Referenced by 1 types

  1. KEY (.31) -- uniqueness index