Views:

Question:
How do you use DocuWare Control commands with DocuWare Import?

Solution:
To learn how to use DocuWare Control commands when using DocuWare Import, please follow the guide below;

First, create a new Document Processing Configuration via DocuWare Configurations.

Under Options, you will check "Use metadata"

Now, specify whether the document file(s) and the corresponding metadata are identified by their file names, by the common folder, or by the definition in the metadata file.

1. When the file name is used as the identify criteria, the file name of the metadata file and PDF file must be the same.

  • Example for identification by the file name:

 

2. If you want to use a subfolder as identify criteria, both files must be located in the same subfolder of the import folder.

  • Example for identification by the same subfolder:
    ...\AdminFolder\Invoice\Invoice01.pdf
    ...\AdminFolder\Invoice\metadata.dwcontrol

 

3. If the file name of the PDF file is to be defined by an entry in the metadata file, this must be specified in the metadata file with an "InsertFile path" command.

  • Example of identification by metadata:
    <ControlStatements xmlns="http://dev.docuware.com/Jobs/Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    ​<Document>
    <InsertFile path="Invoice01.pdf" />
    </Document>

    <Page>
    <DocumentTray name="AdminTray"/>
    <Field dbName="Subject" type="Text" value="Leisure park Jones"/>
    <Field dbName="Date" type="Date" value="2016-04-26" culture="en-US" format="yyyy-MM-dd"/>
    <Field dbName="Company" type="Text" value="Peters Engineering"/>
    <Field dbName="Contact" type="Text" value="Peter Sanders"/>
    <Field dbName="Account Number" type="Numeric" value="494,718,065" culture="en-US" decimalPlaces="2" />
    </Page>
    </ControlStatements>

If the document is in a subfolder of the import folder, the file name and location should be specified using the metadata file. The entry in the metadata file would look like this:
 

  • Example of identification by metadata when importing from subfolder:

<ControlStatements xmlns="http://dev.docuware.com/Jobs/Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
​<Document>
<InsertFile path="C:\Users\admin\Desktop\AdminFolder\Invoices\Invoice01.pdf" />
</Document>

<Page>
<DocumentTray name="AdminTray"/>
<Field dbName="Subject" type="Text" value="Leisure park Jones"/>
<Field dbName="Date" type="Date" value="2016-04-26" culture="en-US" format="yyyy-MM-dd"/>
<Field dbName="Company" type="Text" value="Peters Engineering"/>
<Field dbName="Contact" type="Text" value="Peter Sanders"/>
<Field dbName="Account Number" type="Numeric" value="494,718,065" culture="en-US" decimalPlaces="2" />
</Page>
</ControlStatements>

You can find a list of the DocuWare Control commands within the following link: DocuWare Control

Here, you can download a sample document with a sample .dwcontrol file:
DWControl_DWImport_Sample.zip

This KBA is applicable for both Cloud and On-premise Organizations.