Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Data Model

Data Element Container Grooper.Core

Defines the root container for a document's extracted data, organizing fields, sections, and tables for data extraction, validation, and presentation.

Remarks

The Data Model serves as the top-level schema for a document's data within Grooper. It organizes Data Fields, Data Sections, and Data Tables into a hierarchical structure, enabling robust extraction, validation, and presentation of document data.

To add a new Data Model to a Content Type, right-click the desired Content Type in the tree and select Content Type - Create Data Model from the context menu. This will create an empty data model, which you can then populate with Data Fields, Data Sections, and Data Tables as needed.

Purpose and Usage

  • Use a Data Model to define the complete set of data elements to be extracted from a document type.
  • Acts as the parent for all child data elements, supporting complex, nested document schemas.
  • Configures extraction logic, validation, fill methods, and UI appearance for all contained elements.

Extraction Workflow

When the Extract activity is performed on a document, the Data Model coordinates the extraction process for all its child elements:

  • Extraction logic for each child Data Element (fields, sections, tables) is executed, populating a Document Instance with the results.
  • The 'Run Child Extractors' property controls whether extraction logic for child elements runs automatically or is managed programmatically.
  • Fill methods and validation rules can be applied at the model or element level.

Appearance and Styling

  • The 'Included Style Sheets' property allows you to specify one or more Resource Files containing CSS to control the appearance of data elements in the Data Grid and exported outputs.
  • Style sheets are combined with local CSS from individual Data Elements, enabling both global and targeted customization.
  • CSS class naming conventions allow for precise targeting of elements by type, code name, or custom class.

Inheritance and Overrides

  • Data Models can inherit from parent models, allowing reuse and extension of data schemas across related Content Types.
  • Inherited data elements can be customized or overridden for specific document types using property overrides.

When a Content Type inherits from a parent (such as a Content Category or Content Model), its Data Model will automatically include all data elements defined in the parent model. This enables you to define common fields, sections, or tables at a higher level and share them across multiple document types.

Property Overrides: Any inherited Data Element (such as a field or section) can have its properties overridden in a descendant Content Type. For example, you might override the 'Required' property of a field to make it mandatory for one document type but optional for another, or change the 'Display Name' or extraction logic for a specific use case.

  • Overrides are managed through the Content Type - Overrides tab, where you can view and edit which properties differ from the parent.
  • When a property is overridden, the new value applies only to the current Content Type and its descendants, leaving the parent unchanged.
  • You can reset an override to revert to the inherited value at any time.

Example Scenario:

Suppose you have a parent Data Model for "Invoices" with a Data Field called "Purchase Order Number" (optional by default). For a specific child Content Type called "Government Invoice", you override the "Required" property to make "Purchase Order Number" mandatory. All other invoice types continue to inherit the original (optional) setting.

This inheritance and override system allows you to maintain consistency and reduce duplication, while still supporting specialized requirements for individual document types.

Sample: Invoice Data Model

Below is an example of a Data Model for a typical invoice document, shown as a hierarchy. This demonstrates the use of Data Fields, Data Sections, and Data Tables:

This structure enables Grooper to extract, validate, and present all relevant invoice data in a logical and organized manner.

Related Concepts


For more information, see the documentation for Data Field, Data Section, Data Table, and Document Instance.

Properties

NameTypeDescription
General
Import Source String

Used with import operations.. The source element name.

Appearance
Behavior

Design Tabs

General View properties of this element, along with a preview of its layout in a Data Grid.
Reports View reports for a node.
Scripting Create, debug, modify, and compile scripts for scriptable nodes.
Tester Test data extraction for a Data Element.
Advanced View or edit advanced details about a node.

Child Types

See Also

Used By

Notification