Adding Fields to a Data Table |
|
 |
To
add fields to your data table, open its data folder
and click on the .data file on the Web Directory tab. This will automatically display a preview of your data table in the data table designer. Next click on the Design tab and then click the Add
Fields button to add new fields.
You can select fields from a list
of predefined fields on the Insert Fields page.
If the fields that you want to add are not included
in the Predefined Fields tab, click the Custom
Fields tab to add custom fields.
You
must specify a name and data type for each field that
you want to create. The
following table describes each of the available field
data types, the type of data they store, and the optional
settings available for each, if applicable.
Note that when you add a new field to a data table, you must also manually add that same field to any views in which you want that field to appear. On the other hand, if you add a new field to a view, that field is automatically added to the corresponding data table. Therefore, it is often easier to add a field to a view than to a data table. To add a field to a view, click the Insert dropdown menu in the DataWeb Designer, select New Field, and follow the wizard provided to specify the properties of the new field.
Data Type |
Description |
|
Date |
Date
values between January 1, 1753 and December
31, 9999 |
Options... |
Decimal |
Decimal
values with fixed precision and scale, permitting
nineteen digits to the left of the decimal
point and nine to the right |
Options... |
Integer |
Integer
values between -2,147,483,648 and 2,147,483,647 |
Options... |
Long
Text |
Text
values containing up to approximately one
billion characters |
Options... |
Text |
Text
values of 255 characters or less |
Options... |
True/False |
Boolean
values |
|
HTML |
Use this type of field to store HTML pages or fragments of HTML code. |
|
URL |
Use this field to store URLs for other pages on the web. The values of this field are displayed as working links. |
|
User |
Text
value that's linked to a unique user name
in the web's AddressBook table |
|
Lookup |
Field
that looks up and displays a value from another
table in your web. |
Options... |
File Upload |
This field, when displayed in insert mode, prompts the user to upload a file from his or her machine. The files uploaded are themselves stored in a folder named Files which is automatically created in the data table's data folder. The values of this field are displayed as working links to the uploaded files in the Files folder. The stored values for this data type are paths to the specific files, e.g., "/Files/upload1.gif".
Note that the maximum allowable file size is five megabytes. If your file exceeds this limit, then depending on which browser you're using, you may see a "Page not found" error.
If you secure the Files folder with different permissions than the data folder, be aware that the permissions on the data folder may appear to override those on the Files folder. For example, if you secure the Files folder so that a give group has no access, but provide edit permissions to that group on the data folder, then when a member of that group deletes a record from the table, the corresponding file will be deleted, despite the fact that they have no permissions on the Files folder. |
|
|
For more information on lookup fields,
see Linking Tables with Lookup Fields.
|