Fluid Layout (Table Extract Method)

From Grooper Wiki
(Redirected from Fluid Layout)

This article is about the current version of Grooper.

Note that some content may still need to be updated.

2025 20232021

Fluid Layout is a Table Extract Method that will choose between Tabular Layout and Flow Layout configurations, depending on how labels are collected for a description Document Type.

You may download the ZIP(s) below and upload it into your own Grooper environment (version 2025). The first contains one or more Batches of sample documents. The second contains one or more Projects with resources used in examples throughout this article.

Introduction

Fluid Layout is a table extract method that adapts to documents where the same information may appear either as a traditional grid (with column headers) or as a flowing list (without column headers). Fluid Layout automatically chooses between Tabular Layout and Row Match based on the labels configured for the document's Label Sets.

How it differs:

  • Tabular Layout requires column headers to be present on the document and extracts values under those columns.
  • Row Match treats each matched line or block as a row when headers are not present.
  • Fluid Layout chooses the most appropriate approach at run time, driven by the document's Label Set.

Prerequisite:

When to use

Use Fluid Layout when a single Data Table must read from multiple document types where:

  • Some types present data in columns with headers (e.g., “Code”, “Description”).
  • Other types present the same data as a list or paragraph-like blocks without obvious column headers.

Real-world example:

  • A payer's “Remark Codes” may appear as a neat two-column table on one document type and as a bulleted or wrapped list on another. With Fluid Layout, add column header labels for the tabular version and only a table header label for the list version; the same Data Table will extract both layouts.

Prerequisites:

  • Add Labeling Behavior to the Content Type. See the Labeling Behavior wiki article for information on how to do so.

How to configure Fluid Layout

  1. Configure a Labeling Behavior on your Content Type.
  2. Navigate to the "Labels" tab on the Content Type.
  3. On the Label Set:
    • For Tabular Layout samples: add header labels for each needed Data Column (e.g., “Code”, “Description”) below the target Data Table.
    • For samples requiring Row Match: add a header label for the Data Table (e.g., “Remark Codes”) and do not add column header labels.
  4. Navigate to the Data Table node in your Node Tree.
  5. Set the "Extract Method" to Fluid Layout.
  6. In the Data Table's properties:
    • Expand "Tabular Layout" to configure the tabular scenario (header detection, row detection, optional footer detection). See Tabular Layout for details.
    • Expand "Flow Layout" to configure the list scenario using Row Match (row detection pattern/extractor, optional header/footer extractors, spacing/alignment). See Row Match for details.
  7. Finish any additional configuration details for your Tabular Layout or Row Match. For example, Tabular Layout requires that at least one Data Column has an extractor set for it to be able to detect rows.
  8. Test the configuration on representative pages using the Design page test tools. Confirm:
    • When any Data Column has a header label in the Label Set, Fluid Layout reports “Using Tabular Layout” and extracts by columns.
    • When only the Data Table has a header label (no column header labels), Fluid Layout reports “Using Flow Layout” and extracts rows via Row Match.

Tips for validation and tuning:

  • If nothing is extracted, ensure the Label Set includes either:
    • At least one column header label (for any Data Column), or
    • A table header label (on the Data Table).
  • For wrapped/listed rows, fine-tune Row Match options like "Maximum Row Spacing" and "Row Alignment".=
  • For multi-line tabular rows, adjust "Multiline Rows" under Tabular Layout.

Properties overview

The Fluid Layout extract method exposes two top-level properties. Each is a nested configuration object that runs depending on which labels exist in the Label Set.

Tabular Layout
Definition: The extract method used when the Label Set includes column header labels for the Data Table's Data Columns.
Remarks:

  • When any Data Column has a header label in the Label Set, Fluid Layout executes Tabular Layout.
  • Tabular Layout is designed for structured tables with identifiable headers and rows.

Purpose / use case:

  • Use to read classic grid tables with headers and optional footers.

Key configuration areas inside Tabular Layout (see Tabular Layout):

  • "Table Style" - Interpret table as page-wide or region-confined.
  • "Header Detection" - Find table and column headers (Label Set-aware).
  • "Row Detection" - Identify row lines and align values with columns.
  • "Multiline Rows" - Capture wrapped/stacked content in a single row.
  • "Footer Detection" - Optional extractor for footer content or boundary.
  • "Capture Footer Row" - Include the detected footer as the final data row.

Flow Layout
Definition: The extract method used when the Label Set defines a table header for the Data Table but no column header labels.
Remarks:

  • When only the Data Table has a header label (and no column header labels exist), Fluid Layout executes Row Match.
  • Row Match treats each matched item as a row and maps values by named groups/child extractors to the Data Columns.

Purpose / use case:

  • Use to read lists or paragraph-style rows without column headers.

Key configuration areas inside Row Match (see Row Match):

  • "Row Extractor" - Defines how to find and parse each table row (e.g., pattern with named groups).
  • "Header Extractor"/"Footer Extractor" - Optional extractors; Label Set header/footer labels can also be used.
  • "Maximum Header Spacing"/"Maximum Row Spacing" - Control vertical gaps between header/rows and between rows.
  • "Row Alignment" - Enforce left/center/right alignment between successive rows.
  • "Options" - Flags such as "SinglePage", "Recursive", "UseLabelset", and "CleanControlCharacters".

Additional note (per-column extension):

  • Tabular Layout Options - A per-column extension available when Fluid Layout executes Tabular Layout. Use it to mark required columns and fine-tune per-column extraction/validation behavior.

Troubleshooting

  • No rows extracted: Confirm the Label Set has either a table header (for Flow Layout) or at least one column header (for Tabular Layout). Also verify the correct Content Type is assigned to your document.
  • Wrong method chosen: If Tabular Layout runs when you expect Flow Layout, remove any stray column header labels from the Label Set. If Flow Layout runs when you expect Tabular Layout, add column header labels for the relevant Data Columns.
  • Missing/extra rows:
    • In Flow Layout, adjust Row Match "Maximum Row Spacing" and "Row Alignment".
    • In Tabular Layout, review "Header Detection" and "Row Detection" settings and check for overlapping header labels.
  • Footer included/excluded unexpectedly:
    • In Tabular Layout, review "Footer Detection" and "Capture Footer Row".
    • In Flow Layout, configure "Footer Extractor" or footer labels in the Label Set.

Best practices

  • Build and test the Label Set using multiple samples that cover both tabular and flow presentations.
  • Keep header labels specific and avoid overlapping column header labels where possible.
  • Use per-column Tabular Layout Options when enforcing required data or handling special value types.
  • For Flow Layout, favor readable, maintainable row patterns with named groups that map cleanly to your Data Column names.

Related topics