Assigning data to index tables

Prev Next

Updating index tables is a process handled by the Assign Data workflow activity. The activity can add values or index data from other documents, or even external systems, to the index table of the current workflow document, or replace values that are already there.

Index tables are an index field type of DocuWare. To target a specific entry in an index table, you must first identify the correct column and row, typically by applying filters. Read more about index tables.

The steps for adding data to an index table vary based on two factors:

  • Data source: whether the data comes from a fixed value, an index table, or the index fields of an archived document.

  • Number of destination columns: how many columns you select in the destination index table to edit.

The following examples walk you through the process step by step. This article covers assigning data to index tables from DocuWare only; external data sources are not included.

Selecting an index table as destination

First you define an index table of the current workflow document as a destination for data assignment. This step is the same in all subsequent instructions:  

  1. Go to DocuWare Configurations > Collaboration > Workflow Designer.

  2. Click the button New Workflow or Edit to open an existing workflow in the canvas.

  3. In the left sidebar, click Assign data.

  4. Click the links Assign data, Add first assignment and Set data assignment.

  5. Choose as Destination type: Index table.

  6. Choose as Destination entry an index table of the current workflow document.  

  7. Choose one or multiple columns of the specified index table:

Appending data to an index table

You can append one or more rows to the end of the current workflow document’s index table. In this example, the data source is another document stored in DocuWare.

1. Define source and assignment type

  1. As the destination, select your index table.

  2. Select all index table columns.

  3. Choose the Source type:

    • Select File cabinet if you want to append another document’s index data.

    • Select Index table if you want to address an index table stored in DocuWare.

  4. Activate the option Append to end of table.  

  5. To open the assignment wizard

    • for source type File cabinet click the link File cabinet is not selected.

    • for source type Index table click the link Configure table assignment.

2. Specify the index data to be appended

In this step you specify the set of index data records you want to append. The outcome of this step will be appended to the destination table completely.

The settings vary slightly depending on whether you selected File cabinet or Index table as the source type:

  1. Choose source

    • For the source type File cabinet specify a file cabinet.

    • For the source type Index table specify a file cabinet AND an index table field.
      The example below shows the dialog for the source type Index field:

  1. Filter source
    First create a rule that filters documents in the selected file cabinet. The workflow collects the index data from the documents that meet this rule and prepares it for appending to the destination index table.

    • Example for File cabinet as source: The workflow retrieves all the index data - but without the index tables - from documents in the chosen file cabinet where the Contact is “Werner Moser” and the Company is “Peter Engineering.”

    • Example for Index table as source: The workflow retrieves only the index table data from the documents in the chosen file cabinet where the Contact is “Werner Moser” and the Company is “Peter Engineering.”

    Alternatively, you can use a WHERE clause, which provides multiple field referencing and nested conditions for more complex and flexible filtering than the rule editor.

  2. Max. rows returned
    This option sets the upper limit on how many documents the filter can return. The index data from these documents becomes the source data.
    The maximum number depends on the source type:

    • File cabinet: The maximum row count is 1000. The default is set to 100. In this specific case, the setting limits also how many rows can be appended to the destination table.

    • Index table: The maximum row count is 20. The default is set to 1.

    The Max. rows returned setting takes precedence over the filtering: If the filtering rules return the index data or the index table data of, for example, 10 documents and Max. rows returned is set to “1,” then only the index data or index table data of the first document will be attached.

3. Sort the filtered source index data

In this step you sort the source index data provided in the previous step. The index data will be appended in this sort order.

Add as many sorting as you need.  

Example for sorting the source with Index table as source type: you can sort the filtered index table data by the columns of the index table - which are marked in color.

Example for sorting the source with File cabinet as source type: sort the source data by the index fields of the file cabinet - which are marked in color.

4. Append data to the destination columns

Specify which source values are appended to each destination column.

  1. Select one source column for each destination column.
    You can only map fields that fit each other. For example, a text field may be assigned to another text field, not to a date field.

  2. Click the button Done.

Replacing data in an index table

When replacing specific values in an index table, you must identify the target cells by column and row.

  • Select the columns when defining the destination.

  • To specify the rows in the destination table the wizard provides two additional filters available, Matching rows and Filter rows; these aren’t needed when you append data.

The Source types and further assignment steps available vary depending on the column number.

  • If you have chosen only one column for replacement, the source types Document index and Fixed value are additionally available for entering specific data - see below.

  • If you have chosen more than one columns for replacement, you specify the source data via

    • the source type File Cabinet for collecting index data from any document stored in DocuWare (without index tables) or

    • the source type Index table for collecting the index table data form any document stored in DocuWare.

The source type Local database connection is available for any of these settings, but as it addresses external data it is not subject of this article.

Replacing specific values in the index table

Replace one specific value in the index table with another index value of of the current workflow document.  

1. Define source and assignment type

  1. As the destination, select your index table.

  2. Activate one Index table colum.  

  3. Select Source type > Document Index.

  4. Choose an index field of the current workflow document. You can only map fields that fit each other. For example, a decimal field may be assigned to another decimal field, not to a text field.

  5. Activate the option Configure row filter.  

2. Filter rows of the index table

In this step you filter the destination table according to the values that already exist within the table itself.

  1. Click the link Add filter.
    Example: The values in the destination column are only replaced, if in the same row the value in the index table field Company contains the name “Flying Tom”.

  2. Click the button Done to save the assignment and exit the wizard.

Replacing cells in multiple columns or entire rows in an index table

Replace cells in multiple columns or entire rows in the current workflow document’s index table. Source is the index table from another document stored in DocuWare.

1. Define source and assignment type

  1. As the destination, select your index table.

  2. Pick the columns with the cells you want to replace or just Index table columns > Select all if you want to to replace the entire row.
    Note: In the final step Assign data you must map every column you have selected here, so make sure you have only selected the needed columns for replacement.

  3. Choose Source type > Index table to use data of another index table for replacement.

  4. Activate the option Replace existing table data.  

  5. Click the link Configure table assignment to open the wizard Assign from table data.

2. Specify the source data used for replacement

In this step you specify the data you want to use for replacing the data in the destination index table.

  1. Choose source
    Specify a file cabinet and an index table.  

  2. Filter source

    Create a rule that filters documents in the selected file cabinet. The workflow collects the index table data from the documents that meet this rule. You will use this index table data for replacing the rows in the destination index table.

    • Example - see also the screenshot above: the workflow retrieves all the index table data from documents in a file cabinet (here: Document Pool test) where the Company is “Peter Engineering” and the Amount is greater than 9.999.

    Alternatively, you can use a WHERE clause, which provides multiple field referencing and nested conditions for more complex and flexible filtering than the rule editor.

  3. Max. rows returned
    This option sets the upper limit on how many documents the filter can return. The index table data form these documents becomes the source data.
    For the selected source type Index table, the maximum row count is 20; the default is set to 1.
    With the source type File cabinet, the maximum row count is 1000; the default is set to 100.
    The Max. rows returned setting takes precedence over the the filtering: If the filtering rules return the index table data of for example, 10 documents and Max. rows returned is set to “1,” then only the index table of the first document will be taken into account for the replacement data.  

3. Filter destination by matching rows

In this step you narrow down the rows in the destination by matching the rows of the destination and the source table.  

A row in the destination index table is considered a match if the columns you have specified for comparison contain the same values as those in the corresponding columns of the source record. Only these matching rows are updated or replaced; all other rows remain unchanged.

Note: You are not replacing the values by defining the matching. In this step you only define for which row the replacing will be executed.

  1. Choose, if you want to use the matching rows to narrow down the destination index table.

    • With No, ALL rows in the destination table will be replaced.

    • With Yes ONLY the rows in the destination table with the matches are replaced.

    In this example, acitvate Yes and click Add a condition to define at least one match. In the example below the rule for matching states:
    “The rows in the destination index table will be replaced only, if the destination table field Comany equals the entry in the source document’s index field Company.”  

  1. You may add multiple conditions here. Each additional condition will narrow down the rows to be replaced further.

Behavior for multiple matches for one condition: For multiple matching rows, this describes the behaviour or desired action for the matches

  • Process only the first matching row: This setting is selected by default. You can sort the source documents to bring their associated index data records to the top later. It picks the first matching row as a result for assignment

  • Process up to 10 matching rows: The first 10 results will be taken for the assignment.

4. Sort the filtered source index data for replacement

In this step you sort the filtered source index table data.

The sort order further determines which data is used for the replacement. To clarify this, think of the source index data as a table. During the data assignment step, the workflow processes this table from top to bottom, meaning that only the uppermost rows are appended to the destination table. Sort the source data so the required records appear first.

  • See the index table section to learn more about filtering tables.

  1. Sort the source data by the index fields of the file cabinet.

  2. Add as many sorting as you need.

5. Filter destination by table columns

In addition to the Match rows filter, you can optionally apply Filter rows to further narrow the destination table.

Matching rows filters the destination table by comparing it to external source data using the match code you specify.

Filter rows, by contrast, filters the table according to the values that already exist within the table itself.

  1. Click the link Add filter.
    Example: The rows in the destination are only replaced, if the value in the index table field Company contains the name “Flying Tom”.

6. Replace data in the destination rows

Specify which source index data replace the values in the table cells by mapping the source columns to the destination.

  1. Select one source column for each destination column.
    You can only map fields that fit each other. For example, a text field may be assigned to another text field, not to a date field.

  2. Click the button Done.

Index table FAQ


FAQ

What’s an index table?

An index table is a specific type of index field in Docuware. Unlike a standard text or number field, it allows to store multiple values in a table for a document in one index field.

The image below shows the structure of the index data of a file cabinet, including an example index field named “Articles”:  

  • Think of a table when considering the overall index data structure of a file cabinet.

  • Each row in this table is referring to a document and its index entries stored in the file cabinet.  

  • Each column is representing one index field in the example file cabinet, like “DocID,” “Company,” or “Articles.”

  • The index table field “Articles” is composed of multiple rows and columns itself. It is “a table in a table.”

  • While you can address the entry of a standard text or number index field simply by selecting the document, you need to specify the document AND the index table first to address a table value. Then you may filter the index table by rows.  

How are index tables filtered?

Addressing a specific cell in an index table requires multiple steps:

  1. Choose the index table - a file cabinet may provide multiple index table fields.

  2. Select a column. Here the table field column “Invoice number” is selected:

  3. Filter one or multiple documents in the file cabinet to narrow down the rows of the the index table:  

  4. Sort index table data to address a specific cell. For example, if you want to use the invoice number “245” in the example below for replacing data, the data record of this invoice number needs to be on top, as the workflow processes data records always from top to bottom:


    Sort the “Price” column to achieve this:

How are columns added to an index table?

Adding columns is done when setting up the index table in the file cabinet configuration.

How can I remove columns or rows from an index table?

With the function Assign data to index tables in the Workflow Designer you can remove values from a row by replacing them with empty data.

Give an example how matching rows works?

In Workflow Designer > Assign data > Destination: index table > Replace existing data you have two options to narrow down the index table:

  1. By filtering the destination table on its own values

  2. By defining a match in comparison with the source data. This would be matching rows.

  3. The matchcode for those table is the column “Company”. If the Flying Tom Row matches in source and Destination, then replace vlaue A with Value G.