Sharing field definitions across the document hierarchy
The document information, page information, and field information are stored in a file referred to as the document hierarchy or the setup DCO.
About this task
You specify the document, page, and field information in the document hierarchy panel. Datacap Studio saves this information in the C:\Datacap\application_name\dco_application_name\application_name.xml file.
The document hierarchy for the TravelDocs application is C:\Datacap\TravelDocs\dco_TravelDocs\TravelDocs.xml. This file defines the structure of the batch, and the structure of each document type, page type, and field within the batch. Although the batch structure is hierarchical, the structure of the file is flat, and the name of each document, page, and field object must be unique.
Within the document hierarchy file, the object definition specifies the child objects that are referenced by each parent object. For example, the Room Receipt definition specifies that a room receipt page has three child fields:
<P type="Room_Receipt">
<V n="rules"></V>
<F type="Arrival_Date" pos="0" min="0" max="0"/>
<F type="Departure_Date" pos="0" min="0" max="0"/>
<F type="Total_Cost" pos="0" min="0" max="0"/>
</P>This structure allows multiple parent objects to reference the same child object.
In the TravelDocs application, the Rental Agreement, Air Ticket, and Room Receipt pages all have a Total_Cost field. The first time that you add the Total_Cost field to a page, Datacap adds the field to the document hierarchy. Later, when you add the field to the other page types, Datacap displays a message dialog that prompts you to use the existing reference. If you select Yes, all rules and properties are inherited.