Column
The Column definition defines the properties of each database column in NetForum.
Generally, NetForum uses a two-tier inheritance model for columns. Anytime a field/column is expressed, NetForum goes to the Column definition to get the basic properties. On a case-by-case basis, however, the default column definition can be overridden or expanded in the following places:
- Form Control
- Search Control
- List Table Column
For example, if you define a DropDownList definition at the column level, you will not need to re-define it if that column is used on a Form. If, however, you want to override the default drop-down list definition on a form, you may do so.
As a best practice, try to set global default properties at the column level so it will apply universally in NetForum, instead of setting values for the column on each and every Form Control, Search Control, or List Table Column.
Finding Columns
You can navigate to a Column from the Admin module or enter the column name (e.g. adr_state) in the Super Search.
Uses
Create Column Button
You can add a column directly from NetForum by simply using the Column page to add a column to an existing table. After saving the Column, you will have added a new row to the Column table md_column in NetForum, but that column won't exist yet in the actual database. Once you've saved the column and the page refreshes, click the Create Column button to add the column to the database.
Tips and considerations:
- If you're adding an Extender column, then be sure to check the extended checkbox and also enter the name of the Extender table in the actual table name field, but enter the "main" table in the table name field.
- If you're adding a column that needs to have an index, relationship, default, or other SQL property or attribute, then you'll need to do that in SQL Server.
Controls
- Unique Key - The GUID primary key of the column. Generally this data setting is not used in the Toolkit except behind the scenes.
- Column Name - Actual name of the column in the database table.
- Table Name - The virtual name of the Table this column is linked to.
- Actual Table Name - True name of the database table this column exists in. Example, co_individual_ext for an individual extender column.
- Column Description - Friendly column name. Defaults from SQL column description. If you want to change the description, you may edit this in NetForum and NetForum will update the SQL column definition in the database. The converse is not true - if you update the column definition in SQL, it will not update the description in NetForum. Also, if you have added this column as a Form Control on any Forms, the description will not update on the control labels -- you must manually do this one by one.
- List Header - Optional override to have a different description on List Result headers.
- Control Class - Visual depiction of the column.
- Input Mask -
- Data Type - SQL Data Type. Most NetForum columns are a user-defined data type.
- Display Width - Column display width. Can be shorter than maximum length.
- Maximum Length - Actual column width. A nvarchar(40) column will hold 40 in this field.
- Order - Sort order when columns appear in a DropDownList, e.g. in the Query.
- Default Value: - Enter a default value if needed. You can use Parsed Values.
- Syllable? - Defaults from the actual database schema.
- Extended? - Will be checked or 1 for extender columns.
- Read Only? - If checked, then user cannot add/edit.
- Edit Read Only? - If checked, then user cannot edit field (but might be able to enter a value when adding).
- Hidden? - Will be hidden on forms.
- Required - Check if field is required. Non-nullable columns must generally be required. A column field can be made required. See Required Field for more advanced nuances relating to required fields.
- Causes Post Back? - Use when you want form to postback after user affects this column. In version 2006.02 of NetForum and beyond, this can use AJAX.
- Has Lookup - If this field can have a Hookup linked to it, check this checkbox.
- Not Editable? -
- Log Changes - Check to have values inserted into Change Log.
- Enable For Subform Lookup? -
- Query Select Flag? - Determines whether the column is selectable for front-end queries.
- Disable Autocomplete? -
DropDownList Controls
The six settings below are for DropDownList columns:
- From Table - For DropDownList definition - table(s) from which to pull data.
- From Value Column - For DropDownList definition - value column
- From Text Column - For DropDownList definition - text column to display to user
- Value Where - For DropDownList definition - where clause
- Value Where for Add - For DropDownList definition - where clause for adding only
- Value Order By - For DropDownList definition - sort order, typically same as From Text Column.