Fluid Layout - 2021
Fluid Layout is one of Grooper's methods of extracting table data from documents available to Data Table objects (via the Extract Method property). This table extraction method will alternate between Tabular Layout and Flow Layout configurations from one Document Type to the next, depending on how labels are collected for the Document Type.
The Tabular Layout configuration will execute the Tabular Layout method for the document, provided Data Column labels are collected for the Document Type.
The Flow Layout configuration will execute the Row Match method for the document, provided the Data Table's Header label is collected and NO Data Column labels are collected for the Document Type.
About
FYI | This article is taken from the larger Label Sets article.
The Fluid Layout method is dependent on Label Sets to function and must have a Labeling Behavior enabled to execute properly. For more information on Label Sets and the Labeling Behavior, please visit the Label Sets article. |
The Fluid Layout table extraction method is designed to switch between the Tabular Layout method and the Row Match method, depending on how a Data Table's labels are configured. So, if you have a varied set of documents where Tabular Layout works well for some Document Types and Row Match works well for other Document Types, you may be able to use Fluid Layout for all of them, avoiding the need for Data Element Overrides.
⚠ | Label Sets must be collected to use the Fluid Layout method. Each Document Type will use either Tabular Layout or a Row Extractor to collect table data depending on how the labels for a Data Table are collected. Therefore, you cannot utilize the Fluid Layout method without a Labeling Behavior enabled.
The Fluid Layout table extraction method is not only "Label Set aware", it is Label Set dependent. |
For example, take these two versions of code descriptions from an EOB form. Version 1 is clearly a table. It uses the labels "CODE" and "DESCRIPTION" to delineate between each column. The Tabular Layout table extraction method would handily extract this information, returning everything in the "CODE" column to one Data Column and everything in the "DESCRIPTION" column to another.. |
|
Version 2 is not exactly a table, but a Data Table could still use the Row Extract method to form a table from this list of information. Each bulleted item in the list could be returned as a table row. The code could be filtered into one Data Column and the description could be filtered into another. You could not use the Tabular Layout method for this "table". There are no column labels present.
|
So, we have a situation where the Tabular Layout or the Row Match method is preferable, depending on the document's layout. Next, we will review how to configure the Fluid Layout table extraction method to target both table structures.
Collect Labels
The first thing you will want to do is collect labels for your Data Table for each document type. How the labels are collected will determine which table extraction method the Fluid Layout method executes.
- To execute the Tabular Layout method, the Data Table's Data Column Header labels must be collected.
- Optionally, you may choose to collect a Header and/or Footer label for the Data Table.
- To execute the Row Match method (also referred to as the Flow Layout), you must collect the Data Table's Header label. You may NOT collect labels for the Data Table's Data Column labels.
- This will be how Grooper checks to see which extraction method is used for each Document Type. If Data Column labels are present, the Tabular Layout configuration is used. If no Data Column labels are present, but the Data Table's Header label is present, it will use the Flow Layout (i.e. Row Match) configuration is used.
- Optionally, you may choose to collect a Footer label for the Data Table.
|
For Tabular Layout Document Types
The "V1" Document Type will utilize the Fluid Layout method's Tabular Layout configuration. To execute the Tabular Layout configuration, much like executing the Tabular Layout table extraction method in general, Data Column labels must be collected.
|
|||
|
For Flow Layout Document Types
The "V2" Document Type will utilize the Fluid Layout method's Flow Layout configuration. This will utilize the Row Match method to return table data. To execute the Flow Layout configuration ONLY the Data Table's label must be collected.
|
Configure Fluid Layout
Now that the labels are collected for our Document Types we can configure the Fluid Layout extraction method for our Data Table.
|
|
Expanding the Fluid Layout sub-properties, you can see there are two Layout configurations.
|
|
By expanding the Tabular Layout and Flow Layout properties, you can see their property panels are identical to the Tabular Layout and Row Match table extraction methods respectively.
All that's left is to configure extraction logic for each of the Layouts. |
Configure Flow Layout
The Flow Layout configuration extracts table data using the Row Match method. What do you need in order for Row Match to collect table data? A Row Extractor.
For our purposes, that's all we need to do. For the "V2 - Row Match" Document Types this extractor will properly return each row and collect each columns data. We have no need to configure any of the other Row Match properties. |
Configure Tabular Layout
The Tabular Layout configuration extracts table data using the Tabular Layout method. What do you need in order for Tabular Layout to collect table data? At least one Data Column's Value Extractor must be configured in order to detect each row in the table.
This is a fairly simple table with only two columns. Just configuring one Data Column's Value Extractor will be sufficient for our needs. |
|
|
Test Extraction
Now that extraction is configured for both the 'Tabular Layout and Flow Layout for our documents, Grooper will switch between the Tabular Layout table extraction method and the Row Match table extraction methods, depending on the Document Type.
For the "V1 - Tabular Layout" Document Type, Data Column labels were collected. Therefore Grooper extracts the table using the Tabular Layout configuration. |
|
For the "V2 - Row Match" Document Type, only the Data Table's Header label was collected, and no Data Column labels were collected. Therefore, Grooper extracts the table using the Flow Layout configuration (using the Row Match method). |