Search these areas:
Help
Support Forums
Product Info



Introduction
DataWeb: What's New
Creating an Application
The DataWeb Designer
Application Management
Data Tables
Data Tables
Views
Templates
Components
Data Analysis
Members
Security
Importing
Exporting
FTP
JavaScript
Object Model
JavaScript Objects
General Scripting Objects
Data Access Objects
-cmdDelete Object
-cmdInsert Object
-cmdSelect Object
-cmdUpdate Object
-Data Access Method Arguments
-Field Object
exists
getCaption
getDescription
getProperties
isValid
refresh
remove
setCaption
setDescription
setProperties
-Fields Collection
-Index Object
-Indexes Collection
-previous Object
-record Object
-Resultset Object
-Table Object
-Tables Collection
-TextImporter Object
-Settings Object
-View Object
-Web Object
File Access Objects
Http Client Objects
Security and Membership Objects
Document Object Model (DOM)
Error Descriptions
Object Model Extensions
Full-Text Search
Domain and Email Hosting
HotBlock Modules
Account Management
Glossary
New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

DataWeb User's Guide

Field Object
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);
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us