Edit Column

The Column definition details the properties of a database column in NetForum. The Edit - Column page takes the place of a Column Profile page.

To edit an existing column definition, use the following steps:

  1. Go to Modules>Admin>Column>Find, List, Add, or Query Columns>Edit – Column. The Edit - Column page opens.
  2. Edit the fields in the Column Information section as described in the table below:
  3. Fields Required Description
    column name Required Enter the actual name of the column in the database table.
    table name Required Enter the virtual name of the Table this column is linked to. Columns in an Extender Table will link to the main table here.
    actual table name Required Enter the true name of the database table this column exists in. Example, co_individual_ext for an individual extender column.
    column description Optional Enter the 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 Enter a different description to override List Result headers.
    control class Optional Select the visual depiction of the column from the drop down list.
    input mask Optional TBD
    data type Optional Select the SQL Data Type from the drop down list. Most NetForum columns are a user-defined datatype.
    display width Required Enter the column display width. This value can be shorter than maximum length.
    maximum length Required Enter the actual column width. A nvarchar(40) column will hold 40 in this field.
    order Optional Enter the number for the sort order when columns appear in a DropDownList, e.g. in the Query page.
    default value Required Enter a default value. You can use Parsed Values. If you create a non-nullable column, then the default value is required.
  4. In the Column Properties section, click all the check boxes that apply to the current table according to the definitions in the table below:
    PropertyDescription
    nullable?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.
    causes post back?Use when you want form to postback after user affects this column. This can use AJAX.
    has lookup?If this field can have a Look up linked to it, check this check box.
    not editable?TBD
    log changes?Check this check box to have values inserted into the Change Log.
    enable for subform lookup?TBD
    query select flag?Check if the column is selectable for front-end queries.
    disable autocomplete?TBD
  5. Edit the fields in the DropDownList Configuration section as described in the table below. Anytime a field/column is expressed in NetForum, NetForum goes to the Column definition to get the basic properties. If you define a DropDownList definition at the column level, you do 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 can.
    Fields Required Description
    from tableOptionalThis field is for DropDownList definition, it is the table(s) from which to pull data.
    value columnOptionalThis field is for DropDownList definition, it is the value column.
    display text columnOptionalThis field is for DropDownList definition, it is the text column to display to the user.
    value whereOptionalThis field is for DropDownList definition, it is the where clause.
    value where for addOptionalThis field is for DropDownList definition, it is the where clause for adding only.
    order byOptionalThis field is for DropDownList definition, it is the sort order, typically the same as From Text Column.
  6. Click the Save button to save your changes. Click the Delete button to delete this Column. Click the Cancel button to clear your changes.
  7. Create a column with the create column button (optional). Once you've saved the column and the page refreshes, click the create column button to add the column to the database.

    Note: This button appears only if there is currently no corresponding physical table column.

    When you click Save, new row is added to the column table md_column in NetForum, but that column does not exist yet in the actual database. Clicking the create column button executes the SQL to create the physical column based on the definition you just added in md_column.
    Tips:

    If you're adding an Extender column, then be sure to check the extended checkbox and 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 an index, relationship, default, or other SQL property or attribute, then you'll need to do that directly in the SQL Server.