Keywords: Enterprise 6, admin, configuration, files, file meta-data, 10243
The Enterprise 6 User Interface has the functionality to create, edit and view file objects. These file objects will contain information about the file, or the file meta-data as well as the file itself or if the file is externally linked, the external file's location or address. The file meta-data is stored in two tables. The default fields, how to configure fields as required and how to add custom file meta-data fields are described below.
File Meta-Data - Default Fields
For default file meta-data fields, the following columns from dt_file are shown in the Explorer widget file upload form, file editor form, advanced file search form and the Document and Photo Browser widget file section for the currently selected file:
|Meta-data field in UI||DT_FILE column||Input Type|
|Confidential (Y/N)||confidential_yn||Radio buttons. Defaults to "No"|
|Facility||facility_id||Facility Chooser tool|
|Location||place_type and place_code||Drop-down list available after the facility field is set|
|Date||file_date||Date input with date-picker tool|
Upload form: file selection tool
Other applicable forms: file download link
The File field will either be a file selection tool in the file upload form, or a link to download the file. The DT_FILE.CONTENT column either holds the actual file in binary form, or a link file (.uri) that includes the external location and, optionally, any file content search text. The Explorer widget file upload form has the functionality to create the file object as a link to an external file if it is to be linked to instead of stored. In contrast, the file upload form does not have the ability to add the content search text in the link file.
The following default file meta-data fields can be required fields in the File Upload and File Editor forms in Enterprise. To make these fields required on the forms, the DBA will need to make the associated columns in DT_FILE "NOT NULL".
Before altering the column to "NOT NULL", every record for that column will need to have a value. A DBA with sufficient permissions can then use one of the following commands to make the change.
SQL Server: ALTER TABLE DT_FILE ALTER COLUMN <column name> <data type> NOT NULL;
Oracle: ALTER TABLE DT_FILE MODIFY (<column name> NOT NULL);
File Meta-Data - Custom Fields
Additional file meta-data fields can be added to all file objects in EQuIS. This is done by defining the custom file meta-data field as a new record in the RT_FILE_PARAM_TYPE table. There is no Enterprise 6 tool to populate these field definitions, but the records can easily be entered into the table using EQuIS Professional. Once defined, the values for file-specific custom parameters are stored in the DT_FILE_PARAMETER table. The actual value will be stored in the DT_FILE_PARAMETER.PARAM_VALUE column. This column is a text column. So, regardless of the type of date, it will be stored as text.
These custom file meta-data fields will be displayed below the default file meta-data fields in descending order according to rt_file_param_type.param_code. The following columns in this table are required or optional to define a custom file meta-data field:
|param_code||Required||Code that identifies this file meta-data field.|
|param_name||Required||Display name of this file meta-data field.|
|param_description||Optional||Field description. This is not utilized in the Enterprise User Interface.|
|status_flag||Required||Set to 'A' to make this field active. Set to 'R' to disable this field.|
|ebatch||N/A||This may be used when new fields are created when new data is submitted via EDD. Not applicable to Enterprise user interface.|
|remark||Optional||Internal note for this field.|
|euid||N/A||Not utilized at this time, unless this table is audited.|
|data_type||Optional||This column will indicate what type of value is being saved, since the actual value is saved as text. Values for this column are constrained to those found in st_param_data_type.data_type. Currently, the only data type with special handling is "Date/Time". Fields set to "Date/Time" will have these custom file meta-data fields be date inputs with date-picker tools in the Enterprise file upload form. The file editor form, the advanced file search form and the advanced file search form will be able to correctly search against a data range search criteria.|
Setting a value here can enable a field to become a lookup field with a drop-down list of possible values in the file upload form, the file editor form and the advanced file search form. The value for this column must be a valid SQL select statement that returns the possible lookup values. More than one column can be returned. The first column returned by the SQL statement will be the the saved value. We recommend adding the lookup values to the RT_LOOKUP table.
For example, you could set rt_lookup.lookup_code as the value, rt_lookup.lookup_desc as a description of the value (if necessary) and set rt_lookup.lookup_type to a key word for this custom file meta-data field. Then the SQL select statement might look something like "SELECT lookup_code, lookup_desc FROM rt_lookup WHERE lookup_type = '<custom meta-data field key word>';"
|required_yn||Optional||Setting the value for this column to "Y" will cause this custom file meta-data field to be required in the file upload form and the file editor form. Leaving this field empty will result in the field being highlighted. The save action for these forms will not proceed unless a value is entered into these fields on the form.|