About this article
This article will explain what adaptive sections are and how to create them based on the application and the type of connector used so they can be utilized to populate the smart template.
- What is an Adaptive section?
- When to use a repeating group?
- How to set up a repeating group binding
- How to find suitable data for Collection Expression and Current Item
- How to create adaptive sections in a template?
Prerequisites
|
|
What is an Adaptive section?
An Adaptive section, also called a repeating group, will allow you to repeat a dynamic element (a table row or some text) based on variable data input. Adaptive sections rely on repeating group bindings and external/variable data so they can only be built when utilizing data originating from a Data Connector or an App Connector. Using repeating groups will allow your templates to adapt to the variable data necessary.
For example:
The template should have a table that will adapt the number of rows depending on the number of products (name, quantity, and price) that are part of an opportunity. There are two opportunities, opportunity A contains 3 products, and opportunity B contains 4 products. Leveraging the repeating group binding will allow the table to adapt to the variable input and only display the correct amount of rows:
|
When to use a repeating group?
The primary use cases for using a repeating group are:
- repeating rows in tables (Word and PowerPoint)
- repeating bullets in bulleted lists (Word)
- repeating lines of text (Word)
How to set up a repeating group binding
Setting up a repeating group requires two main steps :
- Creating the main repeating group binding (
Collection Expression
) to create a link to the array of information required to be repeated. - Creating the child bindings (
CurrentItem
) to the specific piece of information that should be repeated from the array (Collection Expression
).
Both steps are required to be performed for Word or for PowerPoint, but will differ based on the origin of the variable data, Data Connector or App Connector, and based on the application used, Word or PowerPoint:
- In Word with a Data Connector
- In Word with an App Connector
- In PowerPoint with a Data Connector
- In PowerPoint with an App Connector
How to find suitable data for Collection Expression and Current Item
Finding suitable data with an App Connector
Finding suitable data for the collection expression and the current item is dependent on the external system being used.
- How to find the data available from the Salesforce App Connector?
- How to find the data available from the SharePoint App Connector?
Example with Salesforce: The array for the Collection Expression
is highlighted in red, and the objects that can be used with CurrentItem
are highlighted in green:
Finding suitable data with a Data Connector
Finding suitable data for the collection expression and the current item will be possible from the Admin Center or directly within the Template Designer.
The Collection Expression
(highlighted in red) must be an array on the first level in the external data source, in the Admin Center, arrays will be represented with square brackets []
, in the Template Designer, arrays will be represented with this icon when using Data Connector
form response smart field. The Repeating item
must be part of the Collection Expression
array and can be located either on the first level (highlighted in yellow) under the array or several levels deep inside the array (highlighted in green). In the Template Designer, the Repeating item
will only be visible once the repeating group has been created by drilling down the array originating from the Data Connector
form response smart field.
In the Admin Center |
In the Template Designer
|
How to create adaptive sections in a template
When building a smart template, it might be necessary to create a dynamic element that will create the correct amount of table rows, paragraphs, or bullet lists, based on variable input. Based on the origin of the variable data, Data Connector or App Connector, and based on the application used, Word or PowerPoint, the steps to create adaptive sections will differ.
|
In Word with a Data Connector
Creating adaptive sections in Word using a Data Connector can be achieved following these steps:
- In the Template Designer, navigate to the
Template
tab - Select the table row or a line of text (with or without a bullet) that should contain the items that will be repeated.
- Click
Add smart field
This step doesn't apply if you are adding the very first smart field in the template - Click on
Form responses
- Drill down the data connector question and click on the array represented with
- Optionally edit the
Display Name
The display name will be displayed in theTemplate
tab once the smart field has been added. - Optionally, perform additional actions on the repeating group
-
Allow Insert And Delete Items
will allow users to manually add a repeating row using the Repeating Section Content Control in Word once the template has been generated. By default, this option isn't checked. -
Edit binding
: Allow editing of the binding syntax to tailor the smart field to specific needs by utilizing functions, conditions, and operators to create more complex use cases. By default, the basic binding syntax will be used. -
Visbility
: Edit the visibility of the smart field based on specific conditions.
-
- Click on
Add to template
The repeating group has been successfully created and will be displayed in theTemplate
tab. The actual items (CurrentItem
) that should be repeated inside the document can now be created. - Select the text inside the previously created repeating group that represents an item that should be repeated column from the data sources that should be utilized in the smart field
- Click
Add smart field
- Click
Repeating item
TheRepeating item
smart field will only be displayed if the cursor is located inside the repeating group. - Select the desired data that should be repeated
- Optionally, perform additional actions on the smart fields.
-
Edit binding
: Allow editing of the binding syntax to tailor the smart field to specific needs by utilizing functions, conditions, and operators to create more complex use cases. By default, the basic binding syntax will be used. -
Visbility
: Edit the visibility of the smart field based on specific conditions. Remove and keep content
: this will remove the content control will be removed upon document generation and will effectively disable the document content updater on the smart field.-
Format
(for dates only) : Specify which date format should be utilized for this date in the template.
-
- Click on
Add to template
TheRepeating item
will be injected into the template and will be displayed in theTemplate
tab as part of the repeating group created in step 6. - Repeat steps 8 to 13 as many times as necessary to add all the relevant items that should be repeated.
In Word with an App Connector
Creating adaptive sections in Word using an App Connector can be achieved following these steps:
- In the Template Designer, navigate to the
Template
tab - Select the table row or a line of text (with or without a bullet) that should contain the items that will be repeated.
- Click
Add smart field
This step doesn't apply if you are adding the very first smart field in the template - Click on
Advanced
- Click on
Custom repeating group
- Optionally edit the
Display Name
The display name will be displayed in theTemplate
tab once the smart field has been added. - Manually type in the
Collection expression
for the array containing the items that should be repeated
For aCollection expression
originating from an App Connector, the expecting binding will be{{HostSystem.ArrayName}}
- Optionally, perform additional actions on the repeating group
-
Allow Insert And Delete Items
will allow users to manually add a repeating row using the Repeating Section Content Control in Word once the template has been generated. By default, this option isn't checked. -
Edit binding
: Allow editing of the binding syntax to tailor the smart field to specific needs by utilizing functions, conditions, and operators to create more complex use cases. By default, the basic binding syntax will be used. -
Visbility
: Edit the visibility of the smart field based on specific conditions.
-
- Click on
Add to template
The repeating group has been successfully created and will be displayed in theTemplate
tab. The actual items (CurrentItem
) that should be repeated inside the document can now be created. - Select the text inside the previously created repeating group that represents an item that should be repeated column from the data sources that should be utilized in the smart field
- Click
Add smart field
- Click
More
- Click
Custom text binding
(orCustom image binding
to insert an image) - Optionally edit the
Display Name
The display name will be displayed in theTemplate
tab once the smart field has been added. - Manually type in the
Binding
for the item that should be repeated
For aBinding
originating from an App Connector, the expecting binding will be{{CurrentItem.ItemName}}
for an item on the first level. If the item is located on a deeper level of the array, the level must be specified prior to the item that should be repeated, example of an item located on the second level{{CurrentItem.NameLevel1.LevelName2.ItemName}}
- Optionally, perform additional actions on the smart fields.
-
Visbility
: Edit the visibility of the smart field based on specific conditions. Remove and keep content
: this will remove the content control will be removed upon document generation and will effectively disable the document content updater on the smart field.-
Inherit Dimensions
/Width
/Height
(for images only) : Specify the dimensions of the image that will be inserted.
-
- Click on
Add to template
TheCustom text binding
for theCurrentItem
will be injected into the template and will be displayed in theTemplate
tab as part of the repeating group created in step 9. - Repeat steps 11 to 17 as many times as necessary to add all the relevant items that should be repeated.
Data from Salesforce used from the above example, the array OpenActivities
is highlighted in red and the current items (ActivityDate
and Subject
) are highlighted in green:
In PowerPoint with a Data Connector
Creating adaptive sections in PowerPoint using a Data Connector can be achieved following these steps:
- In the Template Designer, navigate to the
Template
tab - Select the table that should contain the items that will be repeated.
- Click
Add smart field
This step doesn't apply if you are adding the very first smart field in the template - Click on
Form responses
- Drill down the data connector question and click on the array represented with
- Enter the
Display Name
The display name will be displayed in theTemplate
tab once the smart field has been added. - Optionally, perform additional actions on the repeating group
-
Allow Insert And Delete Items
will allow users to manually add a repeating row using the Repeating Section Content Control in Word once the template has been generated. By default, this option isn't checked. -
Edit binding
: Allow editing of the binding syntax to tailor the smart field to specific needs by utilizing functions, conditions, and operators to create more complex use cases. By default, the basic binding syntax will be used. -
Visbility
: Edit the visibility of the sm
-
- Click on
Add to template
The repeating group has been successfully created and will be displayed in theTemplate
tab. The actual items (CurrentItem
) that should be repeated inside the document can now be created. - Place your cursor inside a cell and manually type the desired binding
The expecting binding will be{{CurrentItem.ItemName}}
for an item on the first level. If the item is located on a deeper level of the array, the level must be specified prior to the item that should be repeated, example of an item located on the second level{{CurrentItem.NameLevel1.LevelName2.ItemName}}
- Repeat step 9 to populate the rest of the cells on the table row
AllCurrentItem
elements created on the table must be located in the same table row.
In PowerPoint with an App Connector
Creating adaptive sections in PowerPonint using an App Connector can be achieved following these steps:
- In the Template Designer, navigate to the
Template
tab - Select the table that should contain the items that will be repeated.
- Click
Add smart field
This step doesn't apply if you are adding the very first smart field in the template - Click on
Advanced
- Click on
Custom repeating group
- Optionally edit the
Display Name
The display name will be displayed in theTemplate
tab once the smart field has been added. - Manually type in the
Collection expression
for the array containing the items that should be repeated
For aCollection expression
originating from an App Connector, the expecting binding will be{{HostSystem.ArrayName}}
- Optionally, perform additional actions on the repeating group
-
Allow Insert And Delete Items
will allow users to manually add a repeating row using the Repeating Section Content Control in Word once the template has been generated. By default, this option isn't checked. -
Edit binding
: Allow editing of the binding syntax to tailor the smart field to specific needs by utilizing functions, conditions, and operators to create more complex use cases. By default, the basic binding syntax will be used. -
Visbility
: Edit the visibility of the smart field based on specific conditions.
-
- Click on
Add to template
The repeating group has been successfully created and will be displayed in theTemplate
tab. The actual items (CurrentItem
) that should be repeated inside the document can now be created. - Place your cursor inside a cell and manually type the desired binding
The expecting binding will be{{CurrentItem.ItemName}}
for an item on the first level. If the item is located on a deeper level of the array, the level must be specified prior to the item that should be repeated, example of an item located on the second level{{CurrentItem.NameLevel1.LevelName2.ItemName}}
- Repeat step 10 to populate the rest of the cells on the table row
AllCurrentItem
elements created on the table must be located in the same table row.
Data from Salesforce used from the above example, the array OpenActivities
is highlighted in red and the current items (ActivityDate
and Subject
) are highlighted in green:
Related articles
Comments
Article is closed for comments.