Data Field Container and Data Element Container

From Grooper Wiki
Revision as of 09:35, 15 August 2025 by Dgreenwood (talk | contribs) (Created page with "<blockquote>{{#lst:Glossary|Data Field Container and Data Element Container}}</blockquote> == About == Certain Data Elements act as "containers" for other Data Elements. These include: * {{IconName|Data Model}} Data Models * {{IconName|Data Section}} Data Sections * {{IconName|Data Table}} Data Tables **<li class="fyi-bullet"> Data Tables are a specialized container for tabular data. They can only contain Data Columns as their children. These container...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Data Field Container and Data Element Container are two base types in Grooper from which "container" Data Elements are derived. Container Data Elements (data_table Data Models, insert_page_break, Data Sections table Data Tables) serve an important function in organizing and defining behavior and extraction logic for the variables Data Fields and view_column Data Columns they contain.

  • While "Data Field Container" and "Data Element Container" are distinct classes in the Grooper Object Model, they are closely related. While Grooper scripters/experts should know the difference, for most practical purposes, the terms are used interchangeably (or they're just called "containers" or "container elements"). See Object Model info for more.

About

Certain Data Elements act as "containers" for other Data Elements. These include:

  • data_table Data Models
  • insert_page_break Data Sections
  • table Data Tables
    • Data Tables are a specialized container for tabular data. They can only contain Data Columns as their children.


These containers serve three primary purposes:

  1. Organization: They organize child Data Elements in a Data Model.
  2. Hierarchy: They create branching points in a Data Element hierarchy (with the Data Model at the root). This allows you to model documents with nested sections, repeating tables, and collections of fields.
  3. Child Configuration: Container Data Elements share special properties that control how their child Data Elements are displayed and behave during Review, are extracted, certain validation controls, and how lookups are performed.

Organization

Data Models, Data Sections and Data Tables can't extract data without child elements:

  • variables Data Fields can be added to Data Models and Data Sections
  • view_column Data Columns can be added to Data Tables.

This is why Data Models, Data Sections and Data Tables are called "containers". If nothing else, they are buckets that hold Data Fields and, in the case of Data Tables, Data Columns.

In terms of organization, Data Sections play an important role. For larger Data Models, it's often useful to group similar Data Fields together. To do this, Data Fields (and other Data Elements) are simply added to a Data Section with no section logic defined.

Grouping Data Elements with a Data Section can:

  • Help Grooper designers locate fields in a large Data Model.
  • Help Review users using the Data Viewer locate fields when reviewing extraction results.
  • Provide useful ways to target Data Elements for CSS styling.

Example:

In this example, the "Header Details" and "Amounts" sections are used to organize Data Fields related to invoice processing.

data_table Data Model
insert_page_break Header Details
variables Vendor
variables Invoice Number
variables Invoice Date
variables Due Date
insert_page_break Amounts
variables Subtotal
variables Tax
variables Discounts
variables Amount Due
  • When adding a Data Section only used to organize child Data Elements. Be sure to configure the following properties:
    • Leave "Extract Method" blank.
    • Set "Scope" to Single Instance.
    • Set "Miss Disposition" to Default to Parent.
      • Because this kind of Data Section doesn't have an extract method defined, its child extractors will fail if you don't set the Miss Disposition properly. Without an extract method defined, the Data Section effectively always "misses". Setting to "Default to Parent" ensures its child Data Elements have a document instance to extract from.

Hierarchy

Data Models, Data Sections and Data Tables serve an important role in defining the

Object Model info

Important Note:

  • Data Model, Data Section, and Data Table all inherit from "Data Field Container"
    • "Data Element Container" inherits from Data Field Container
    • Only Data Model and Data Section inherits from Data Element Container.
  • Data Table inherits from "Data Field Container" not Data Element Container.

Data Field Container

Type name: Grooper.Core.DataFieldContainer

Inheritance

Grooper Object (Grooper.GrooperObject)
Connected Object (Grooper.ConnectedObject)
Node (Grooper.GrooperNode)
Data Element (Grooper.Core.DataElement)
Data Field Container (Grooper.Core.DataFieldContainer)

Derived Types

Data Field Container (Grooper.Core.DataFieldContainer)
Data Element Container (Grooper.Core.DataElementContainer)
Data Model (Grooper.Core.DataModel)
Data Section (Grooper.Core.DataSection)
Data Table (Grooper.Core.DataTable)

Data Element Container

Type name: Grooper.Core.DataElementContainer

Inheritance

Grooper Object (Grooper.GrooperObject)
Connected Object (Grooper.ConnectedObject)
Node (Grooper.GrooperNode)
Data Element (Grooper.Core.DataElement)
Data Field Container (Grooper.Core.DataFieldContainer)
Data Element Container (Grooper.Core.DataElementContainer)

Derived Types

Data Element Container (Grooper.Core.DataElementContainer)
Data Model (Grooper.Core.DataModel)
Data Section (Grooper.Core.DataSection)