None of this is necessary as of version 5.8.4. See the Administer Extensible Table help topic.


As of now (March 2015, v5.6 of BIotics), there is no user interface for managing extensible tables, but you can make modifications to existing tables. This requires two steps:

1. altering the underlying extensible table (e.g., to increase size of a column or change its name or to add a new column)

2. updating the database table DYNAMIC_ATTRIBUTE, which stores information about that table. 


Example: You want to increase the size of a text field from 1000 to 2000 characters.


Step 1: Log into a database tool such as SQL Developer or Toad, as biotics_dlink, and run this statement, substituting your table and column names for XXXX and yyyy:

           alter table XXXX modify yyyy VARCHAR2(2000);


Step 2: Run this update: 

           update DYNAMIC_ATTRIBUTE set column_size = 2000 where column_name = 'YYYY';

           commit;

           (Note: Make sure that you only have one extensible table with this column name before you run the update.

            Otherwise, query the DYNAMIC_ATTRIBUTE table to find out the dynamic_attribute_id of the column you have modified.)


Step 3: In Biotics 5, run Grant/Refresh Database Privileges so that you can see the changes applied onscreen.


If you are adding a new column to an existing extensible table, you'll have to INSERT a new row in DYNAMIC_ATTRIBUTE. It must include the following information, remembering to put all string values in single quotes:

DYNAMIC_ATTRIBUTE_ID - Primary key - determine by querying and adding 1 to the result: select max(DYNAMIC_ATTRIBUTE_ID) from dynamic_attribute

DYNAMIC_OBJECT_ID - Foreign key from DYNAMIC_OBJECT table that specifies which extensible table the new column is in

COLUMN_NAME - in all caps

COLUMN_DATA_TYPE - in all caps

COLUMN_SIZE - enter field size for CHAR or VARCHAR2 fields; enter 27 for NUMBER fields; enter 0 for DATE fields

DEFAULT - only used for checkbox fields if you want to set default to N or Y; if default isn't set, the field is null unless edited on UI (and therefore null and N are equivalent)

DISPLAY_LABEL - field label displayed on screen

DISPLAY_ORDER - number indicating where the new column should appear in relation to other columns

VISIBLE - enter 1 to make new column visible onscreen

SYSTEM_CONTROL_TYPE_CODE - enter either TXB for simple text box, RTE for rich text box, CHB for checkbox (only valid for a CHAR(1) field), DCT for date (only valid for DATE datatype field), or DCB (only valid if field links to a domain table)

OBJECT_CONTROL_ID - must be filled in, but not meaningful in Biotics 5, so use an number 700000 or above


If new column is a foreign key link to a domain table, you must also fill in:

DOMAIN_TABLE_NAME

DOMAIN_DISPLAY_COLUMN - column from domain table that you want displayed in the extensible field

DOMAIN_DATA_COLUMN - column from domain table that is the foreign key (must by the ID column)

DOMAIN_DISPLAY_WIDTH - use 50


To drop a column (including all of its data):


ALTER TABLE table_name DROP COLUMN column_name;

 To add a column:

ALTER TABLE table_name ADD column_name data_type NULL/NOT NULL;
ie. ALTER TABLE eo_mo_ext_1 ADD NC_COMPLEX varchar2(5) NULL;