The string that specifies the name of the field.
string
R
Specifies the order the field is listed in relation to other fields. Field order is 0-based. When changing the value, if needed, the order of other fields will be incremented to prevent duplicates.
integer
R/W
A Boolean value that specifies whether the user may change values of the field in the user interface. When readonly is true, no changes are allowed.
Boolean
R/W
The value of sort specifies how this field contributes to the ordering of files in the collection.
If the value is 0, this field is not used to sort the files. If the absolute value is 1, this field is the primary sort field. If the absolute value is 2, the field is the secondary sort field (used to break ties on the primary sort field), and so on. Additionally, the sign of value indicates the direction in which the files should be sorted. Positive values indicate that the files are sorted in ascending order, and negative values indicate that files are sorted in descending order.
integer
R/W
To illustrate the sorting scheme, consider a simple set of 4 fields that describe an email inbox: From, Subject, To, and Received. Each file in the collection represents a single email message. Set the sort order for each of these fields as indicated below:
From: 0
To: 0
Subject: 1
Received: -2
The above sort order indicates that the primary sort field is "Subject" (the absolute value of the field is 1) and that files should be sorted in ascending order (the sign is positive). If two files have the same subject, the secondary sort field is consulted. In this case, the secondary sort field is "Received" (the absolute value of the field is 2) and it is specified to sort in descending order. The files are sorted by Subject in ascending order. Any files that have identical Subjects will be sorted in a subgroup by their Received field, but in descending order. The other fields do not contribute to the sort, since they are 0.
The value of text specifies the display text used by the field in the user-interface.
string
R/W
A text string that specifies the type of data stored in the field. Possible values include:
S, the value of this field is a string type.
D, the value of this field is a date type.
N, the value of this field is a number type.
F, the value of this field is the file name of a member of the collection.
Desc, the value of this field is a description string of a member of the collection.
Size, the value of this field is the file size of a member of the collection.
ModDate, the value of this field is the modification date of a member of the collection.
CreationDate, the value of this field is the creation date of a member of the collection.
CompressedSize, the value of this field is the compressed file size of a member of the collection.
The value of this property cannot be changed for a field that already exists. When a new field is created using the addField method, the type can be set.
string
R
Modify and examine the properties of user-defined field "from".
var f = this.collection.getField("from");
f.visible = true;
f.order = 1;
f.text = "From";
console.println("Field name: " + f.name);
console.println("Field type: " + f.type);