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)
-
Go to Kameleon Portal > Data > Meta Groups.
-
Ensure you have the metadata fields (e.g.,
Customer ID,Project Code,Cost Center) that will supply the filter values to the Data Table. -
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)
-
In Kameleon Portal, navigate to Data > Data Tables.
-
Click New(or edit an existing Data Table).
-
Set the Name for the Data Table.
-
Select the Data Source containing your data.
-
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).
-
-
Under Table Columns:
-
Add and arrange the columns from the Data Source you want displayed in the document table.
-
-
Click Save.
Step 3: Attach the MetaGroup to the Template (Portal)
-
In Kameleon Portal, navigate to Contents > Document Templates.
-
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)
-
Open the Kameleon Content Tools.
-
Open document template.
-
Expand the Data Tables section.
-
Your Data Table will appear in the list because its reference fields match the template's MetaGroup fields.
-
-
Place your cursor at the desired location in the document and click the Data Table to insert the placeholder.
-
Update document template.
Step 5: Document Generation (End-User Experience)
-
When a user creates a new document using this template from the Kameleon Taskpane:
-
The user fills in the metadata properties (e.g., selects a Customer or Project).
-
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. |