If the view that you are importing to includes a Document field with associated documents, the import action imports the documents from server-side folders to the database afm_docs and afm_docvers tables.
When exporting data, if the view includes a Document field, and this field is visible in the view, any document files stored in the afm_docs and afm_docvers tables are saved into specified server folders.
Note: For general information about Data Transfer, see Data Transfer Overview.
Exporting the Inventory Table, exports the documents associated with that table. For instance, exporting the activity_log table exports all activity_log documents.
Exporting the afm_docs and afm_docvers table exports the document metadata: descriptions, version descriptions, dates of change, and authors.
Both match up again if they are re-imported into the same database. You can import the documents or the metadata first. It doesn’t matter, since the import rematches them based on their primary key.
If you don’t re-import the metadata, the documents can still be uploaded and downloaded. This condition can happen if you use the Project Update Wizard on the inventory tables, but not on the metadata tables.
Note the following about exporting document files:
C:\Users\Public\Archibus\projects\users\afm\dt." Notice, that there is a folder containing the image files, as well as a .csv file:
Note the following about importing files:
C:\Users\Public\Archibus\projects\users\public\dt\database-update\personalized-database
Follow these steps to import document fields:
[your_user_name]\dt\[your_csv_file] for the import file
For example:
afm\dt\activity_log.csv
and
[your_user_name]\dt\[your_table_name]\[all_your_image_files_for_the_table for the documents associated with the Document (doc field) of the table
For example:
afm\dt\activity_log\doc4^8665^1^activity_log-8665-doc4.png for a document image file associated with the Action Items table.
For each subfolder name that is a table name, the application reads all file names in that subfolder.
For each file, the application:
When you export views with documents:
[your_user_name]\dt\[your_table_name]\[all_your_images_file_for_the_table
that is:
afm\dt\activity_log\doc4^8665^1^activity_log-8665-doc4.png for a document associated with the Action Items table
Ensure that the file name for each of the documents places the primary key between the Inventory Table Name (table_name) and the Inventory Field (field_name).
For example:
doc^5^1^msds_data-5-doc.pdf where “5” is the primary key of the asset record to which the doc is associated, and msds_data is the Inventory Table name and doc is the Inventory Field.
Note: If a file name contains a carat (^) replace that with two carats (^^). This enables the application to distinguish between multi-part keys and the file name itself.
The data transfer process can automatically name files, or instead use the name for the file stored on the server. The method used depends on the schema A/FM field’s definition of the field.
In the cases where the name is automatically generated, the application assigns file names using the following convention:
<table><field><key>.<extension>
For example,
activity_log-doc-305.doc
If you previously imported documents using an older version of Archibus that used a different convention, the files are renamed using the new convention when you check in a new document, or check in revisions to existing documents.
If the file name is not automatically generated based on the schema A/FM field’s definition of that field, data transfer takes whatever file name is on the server and imports it. For example, the following file names are the actual file names on the server:
ConstructionContract_R01.doc and ConstructionContract_R02.doc
If the document field supports multiple versions, a new record will be generated for each new document version checked in. If the document field does not support multiple versions, the table will contain one record for the single version that is checked in. This will be numbered version 0.
When multiple versions are supported, data transfer automatically updates the version number when documents are imported by incrementing the version number by one. The version number is used by the application to identify the document, so do not remove this number. In the following example, 1 is the version number:
doc^5^1^msds_data-5-doc.pdf
Copyright © 1984-2020, Archibus, Inc. All rights reserved. |