Kameleon Help

Data Tables for Placeholders

In Kameleon, Data Tables allow you to dynamically insert tabular data from external Data Sources (e.g., Csv and SharePoint Lists) directly into document templates via placeholders.

IMPORTANT

Key Requirement: Reference Type Filter Fields For a Data Table to be used as a placeholder in a document template, all of its filter fields MUST be configured as Reference types.

Why? When a document is generated from a template, placeholder replacement happens automatically. The Data Table cannot prompt the user with interactive dialogs; it must automatically resolve its filter values from the document's metadata fields. If any filter field is not a Reference type, the Data Table will not appear in the Content Tools placeholder list for that template.


Step 1: Ensure MetaFields Exist (Portal)

  1. Go to Kameleon Portal > Data > Meta Groups.

  2. Ensure you have the metadata fields (e.g., Customer ID, Project Code, Cost Center) that will supply the filter values to the Data Table.

  3. Note the MetaGroup containing these fields, as it will need to be attached to your document template.

Step 2: Create and Configure the Data Table (Portal)

  1. In Kameleon Portal, navigate to Data > Data Tables.

  2. Click New(or edit an existing Data Table).

  3. Set the Name for the Data Table.

  4. Select the Data Source containing your data.

  5. Under Filter fields:

    • Click Add Field.

    • Set Type to Reference.

    • Select the Data Source Column you want to filter by.

    • Select the corresponding Reference MetaField (the document metadata field that provides the filter value).

    • Repeat for all filter columns. (Ensure all filter fields type are set to Reference).

  6. Under Table Columns:

    • Add and arrange the columns from the Data Source you want displayed in the document table.

  7. Click Save.

Step 3: Attach the MetaGroup to the Template (Portal)

  1. In Kameleon Portal, navigate to Contents > Document Templates.

  2. Edit your template and ensure the MetaGroup containing the referenced filter fields is added to the template.

Step 4: Insert the Data Table Placeholder (Admin Tools)

  1. Open the Kameleon Content Tools.

  2. Open document template.

  3. Expand the Data Tables section.

    • Your Data Table will appear in the list because its reference fields match the template's MetaGroup fields.

  4. Place your cursor at the desired location in the document and click the Data Table to insert the placeholder.

  5. Update document template.

Step 5: Document Generation (End-User Experience)

  1. When a user creates a new document using this template from the Kameleon Taskpane:

  2. The user fills in the metadata properties (e.g., selects a Customer or Project).

  3. Kameleon automatically reads the reference property values, queries the data source with those filter values, and populates the table directly into the placeholder.


Issue

Cause & Solution

Data Table does not appear in Content Tools placeholder list

One or more filter fields in the Data Table are not set to Reference type, or the referenced MetaField is not part of the MetaGroups assigned to the current template.

Data Table returns empty rows in document

Ensure the document's metadata values match the values in the Data Source filter column.