|
 |
The Field object represents a field in a data table.
Constructor
tableInstance.fields.add(name, type [,object]) |
Creates a new field name in the data table tableInstance. This method also constructs and returns a new Field object instance. See the add()method of the Fields collection for more detailed information. |
tableInstance.fields.fetch(name) |
This method constructs a Field object instance representing the field name. This method does not create a new field in the data table, it only creates the Field object instance. See the fetch() method of the Fields collection for more detailed information. | |
Instance Properties
name |
A read only string property that gives the name of the Field object. |
parent |
A read only string property that gives the name of the data table which contains the field represented by the Field object. |
type |
A read only string property that gives the data type of the Field object. |
version |
This property gives the version of the data table on the last occasion that the field instance took a snapshot of the data table.
(The data table version and the field instance version will go out of synch when the data table schema is changed, for example, if a field is added or removed.
But adding or removing data from the data table will not make the versions go out of synch.) Use the refresh() method to update the field instance's snapshot of
the data table. |
|
For a complete list of instance properties associated with the Field Object see Field.getProperties()
Instance Methods
exists |
Checks to see if a specified field exists in a specified data table. |
getCaption |
Retrieves the caption for a specified field. |
getDescription |
Retrieves the description for a specified field. |
getProperties |
Returns an Object whose properties are all the non-NULL properties of a specified field. |
isValid |
Compares the Field object instance with what it represents, i.e., a field in a data table. This method returns false if the version property of the Field instance is different from the version of the data table. |
refresh |
Refreshes the properties of the Field instance based on the current properties of the data table. |
remove |
Removes a field from its parent data table. |
setCaption |
Sets the caption for a field. |
setDescription |
Sets the description for a field. |
setProperties |
Sets various properties of a field in a data table. | |
Constructor Example
var o = new Object();
o.caption= "New Field Caption";
var newFieldObj = someTable.fields.add("newField", "text", o);
|