How to Add a Document Field to the Data Dictionary
If you want to add a field to hold associated documents, follow this procedure.
Note: You can also access the Archibus Field table from the System / Add-in Manager / Edit Data Dictionary task, available in Web Central or Smart Client.
To add a document field
- In Smart Client, select System / Add-in Manager / Edit Field Dictionary to access the Archibus Fields table.
- Click in the top row to create a new blank record.
- Specify the table to which this field belongs by choosing an existing table for the Table Name field.
- For Field Name, enter a value that will uniquely identify this record
- Enter the definition of the field in the Archibus Fields data dictionary table and set the Archibus Type to Document. For information on setting the specific properties of your new field, see Archibus Fields table (reference).
- Using XML, complete the Field Attributes field to control document versioning, document file naming, locking, and so forth. See the below section for details.
- Save the record defining your field.
- Run the Schema Change Wizard. For details, see General Procedure for Changing the Structure of the Database.
Archibus creates the new field and notes the association between
the field and the document vault (the Archibus Documents table, the Archibus Documents
Versions table, the Archibus Documents Versions Archive table).
Completing the Field Attributes field
Use XML to complete the Field Attributes field, which contains the following attributes:
versioningOn=false.
Default is false. If true, the program:- Requires the named user to supply a description of each change.
- Creates new record in the afm_docvers table for each change.
- Automatically numbers each version. Version numbers start with 1.
lockOnCheckout=true.
Default is true. If true, the "Locked?" (Yes) (No) control on the "Check Out" form defaults to (Yes).clearLocksOnCheckIn=true.
Default is true. If true, sets the "Locked?" (Yes) (No) control on the "Check In" form to (No).MaxDocumentSize=10000000.
This limits the document size in bytes. Use " -1" for unlimited size. For example, a typical lease document is 3 MB. System administrators can use this attribute if they wish to prevent users from uploading a 125 MB Word file or PowerPoint file for a Lease Document field. The maximum value you can enter for this field is 100 MB, which is useful when working with documents displayed in the 360 ViewerautoNameFile=false
. Default is false. If users have a reasonable order to their files, you should set "autoNameFile" to false. When autoNameFile is false, the original file name is used.- If the attribute
autoNameFile
is true, then the application always renames the file on Check In according to theautoNameFil
e attribute for the field. The value is{inventory table}-{concatenated pkey with hyphens}-{field name}.{original file extension}
. - For example, a file could be auto-named “ls-101-contract.doc” or “afm_dwgs-hq-17-dwg_name.dwg”. Note that hyphens are used as the primary key value separators for file names, as opposed to vertical bars which are used as primary key value separators in the pkey value fields in the afm_docvers and afm_docversarch tables. This is because vertical bars are not valid in file names.
- This same generated name is used when the file is Checked Out. This behavior makes the rule simple to implement and ensures that the file name is always consistent. It also allows a user to automatically establish order to randomly named fields, such as image files for Knowledge Base items or multiple files named "lease.doc").
- If the attribute
Example
<root>
<documentManagement maxDocumentSize="10000000" versioningOn="true"
autoNameFile="true">
<lockingOptions lockOnCheckout="true" clearLocksOnCheckIn="true"/>
</documentManagement>
</root>
See Also