Admin - Add Column

Caution!
  1. Creating a new column on a live system can corrupt existing or new data.
  2. If you create a column on a large table, it could take the system a while to add that column. While the system is working, the site can have performance problems.

You can add a Column to an existing database table in NetForum provided the following conditions are met:

  • If the main table is baseline, then you must add a column to an extender table.
  • If the main table is custom, then you can add a column to either the main table or the extender table.
  • You must use the following column naming conventions:
    • the column name must start with the table’s defined three-letter prefix, followed by an underscore.

    • if you are naming a column in the extender table, the column name must end with _ext.

 

Important! Filling out this page and clicking Save, only creates a metadata description of the new column. You must finish adding the column by going to the Edit Column page. See the full steps on this topic and the Edit Column topic for the complete set of steps.

To start the process of adding a Column, use the following steps:

  1. Go to Modules>Admin>Column>Add Column. The Add - Column page opens.
  2. Use the descriptions in the table below to enter information:
    Fields RequiredDescription
    column nameRequired Enter the actual name of the column in the database table.
    table name RequiredEnter 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 nameRequiredEnter the true name of the database table this column exists in. Example, co_individual_ext for an individual extender column.
    column descriptionOptionalEnter 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 OptionalEnter a different description to override List Result headers.
    control classOptionalSelect the visual depiction of the column from the drop down list.
    input mask OptionalTBD
    data typeOptionalSelect the SQL Data Type from the drop down list. Most NetForum columns are a user-defined datatype.
    display width RequiredEnter the column display width. This value can be shorter than maximum length.
    maximum length RequiredEnter the actual column width. A nvarchar(40) column will hold 40 in this field.
    orderOptional Enter the number for the sort order when columns appear in a DropDownList, e.g. in the Query page.
    default valueRequiredEnter a default value. You can use Parsed Values. If you create a non-nullable column, then the default value is required.
    Column PropertiesOptionalUse the checkboxes to apply column properties.
    DropDownList ConfigurationOptionalFor columns with the control class set to DropDownList, use the fields in this section to enter configuration information.
  3. Note the actual table name for future reference.
  4. Click Save to save the new column and go to the page you were on previously. Click Cancel to return to the previous page without saving your changes.
  5. To complete adding a table, you must go to the Edit Column page.
  6. Go to Admin > Find Column, type the actual table name in the field, and click Go. The Edit Column page for the newly added column opens.
  7. See the Edit Column topic, step six, for the details on adding a physical column.