-
Notifications
You must be signed in to change notification settings - Fork 5
Field Types
In this page:
- boolean
- integer
- decimal
- text
- textarea
- date
- datetime
- time
- url
- phone
- password
- formula
- html
- image
- document
- dropdown
- multi-selection dropdown
Boolean fields are Yes/No values displayed as checkboxes. A Boolean field is stored as a numeric value (Yes=1, No=0 or null). The most efficient database column type for it is bit.
These types are used for numeric values. Decimal can be stored as data type money or decimal. Integer can be smallint, int, bigint...
This type is the most commonly used one. It is displayed as a text box in edit mode. It is a string stored as varchar or nvarchar.
Fields of these types are displayed as big text boxes (HTML "textarea") and can spread over several rows. They can be stored as text, varchar, or nvarchar.
Dates are displayed as an input box with a date picker in edit mode, and as a formatted string in other modes. The Javascript for the date picker is an external JS file which can be customized. Possible database column types are datetime or smalldatetime.
Text value displayed as a text box in edit mode and hyperlink in other modes. These can be stored as varchar, or nvarchar.
Displayed as a text box in edit mode, with phone-compatible validation. To be saved in varchar or nvarchar columns.
Displayed as a password text box in edit mode. To be saved in varchar or nvarchar columns. Password text boxes do not display their current value when editing an existing record.
SQL formula or sub-query. The calculation SQL is entered in the DBColumn field.
Fields of type formula cannot be edited by users.
Example formula: SELECT COUNT(*) FROM EVOL_Photo P WHERE P.albumid=T.id
The "html" field type is used to display Rich Text Format (RTF) or HTML. It uses a WYSIWYG editor in the browser.
Images are displayed as such in view mode, as a box with a browse button for upload in edit mode, as a checkbox in the search and advanced search modes. Images are stored on the file server, only the filename is stored in the database, as a varchar or nvarchar.
Documents are displayed as a link for download in view mode, as a text box with a browse button for upload in edit mode, as a checkbox in the search and advanced search modes. Like images, documents are stored on the file server and only the filename is stored in the database.
Lists of values are choices of values displayed as drop-down lists in edit mode or as the string of the selected value in view mode. They correspond to joins to secondary tables in the database and are stored in the driving table as a number which is the primary key of the value in the secondary table.
Multi-selection dropdown lets you select more than one value from the list of values. The list of selected values will be saved as a comma-separated list (for example: "1, 3, 15, 12"). Therefore the corresponding DBColumn data type should be varchar or nvarchar.
Copyright © 2019 Eitan Blumin. All Rights Reserved.
boolean
integer, decimal
text
textarea
date, datetime, time
email, url
formula
html
image
document
dropdown, multi-selection dropdown