|
Unfortunately there is no automated process for adding variable fields into
the database, since the software currently doesn't support meta databases. However,
it is possible to add variable fields manually.
This task requires a good understanding of Relational
Databases. Do not attempt this if you are not experienced. Instead,
contact the project team and ask for assistance.
Columns added to the ZENTRACK_VARFIELD table must be named in the
format custom_ttttXX where tttt represents the type (menu, string,
number, boolean, date, or text) and XX represents the consecutive number
(you cannot skip any numbers).
For our examples here, we will assume we want to create the new field
custom_string3.
Step 1: BACKUP DATABASE
Create a backup of anything in your database you desire to keep.
Step 2: Open SQL Interface of your choice
Step 3: Create database column
For any field except custom_mulit, run the equivalent command for your database, insuring you enter the correct column type:
alter table ZENTRACK_VARFIELD add column custom_string3 varchar(255);
To create a custom_multi field, run this command instead:
alter table ZENTRACK_VARFIELD_MULTI add column custom_multi3 varchar(255);
Step 4: Insert field into the field map
Make a copy of the file install/utils/add_to_map.sql and make the following
changes to this file.
Substitute your field name for custom_string3
If you are not creating a string type field, make the following substitutions according
to the field type:
| Field Type | Replace | With |
| custom_menu | 'text' | 'menu' |
| custom_text | 'text' | 'textarea' |
| custom_date | 'text' | 'date' |
| custom_date | '200' | '20' |
| custom_number | '200' | '20' |
| custom_multi | 'text' | 'menu' |
| custom_multi | '200','1','0' | '50','8','0' |
Note that the field_map_id must be unique. We started you off at 9000, which should
never conflict with any upgrades. If you add more than one field, you will want to
increase this number each time so that all entries have a unique id.
Run the commands against your SQL client.
Step 5: Log into zentrack
You must close your browser windows and open a new window. Login as
Administrator.
Step 6: Edit Varfield Settings
Browse to the Edit Field Map section and update your new field on each view where it will be displayed
Step 7: Clear the Browser's Session Data
This is done by closing all instances of the browser window. If you have
debugging enabled, you may use the 'click here to clear session cache' link
instead.
|