Articles in this section

How to create adaptive sections in a template

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

 

Prerequisites

 

 

 
  • Please note that the Template tab is only available in Word and PowerPoint, and injecting adaptive sections into an Excel Spreadsheet is not supported.
  • Adaptive sections are not supported with the Document content updater, it should be turned off in order to make the template valid (and to be able to upload it to Library without a validation error).

 

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: 

 

Adaptive_sections.png

 

 
  • Adaptive sections are not supported with the Document content updater, it should be turned off in order to make the template valid (and to be able to upload it to Library without a validation error).
  • The external data originating from the Data Connector or the App Connector update automatically when changes are added to the source/external system
  • When using repeating groups on tables, the design will be dictated by the Table Style. 
  • Unsupported scenarios: text element inside repetition and repeating cells inside a row
  • Inserting images in repeating groups is only supported in Word. 

 

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:

 

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.

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: 

Salesforce_array_and_objects.png

 

 

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 RepeatingGroupMedium.svg when using Data Connectorform 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

Data_connector.png

In the Template Designer

Array_Template_designer.pngItem_Template_designer.png

 

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.

 

 
  • Once the smart fields have been created, they can be edited, or deleted.

 

 
  • Adaptive sections are not supported with the Document content updater, it should be turned off in order to make the template valid (and to be able to upload it to Library without a validation error).

 

In Word with a Data Connector

Creating adaptive sections in Word using a Data Connector can be achieved following these steps: 

  1. In the Template Designer, navigate to the Template tab
  2. Select the table row or a line of text (with or without a bullet) that should contain the items that will be repeated.
  3. Click Add smart field
    This step doesn't apply if you are adding the very first smart field in the template 
  4. Click on Form responses 
  5. Drill down the data connector question and click on the array represented with RepeatingGroupMedium.svg 
  6. Optionally edit the Display Name
    The display name will be displayed in the Template tab once the smart field has been added.
  7. 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. 
  8. Click on Add to template
    The repeating group has been successfully created and will be displayed in the Template tab. The actual items (CurrentItem) that should be repeated inside the document can now be created.
  9. 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
  10. Click Add smart field
  11. Click Repeating item
    The Repeating item smart field will only be displayed if the cursor is located inside the repeating group. 
  12. Select the desired data that should be repeated
  13. 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.
  14. Click on Add to template
    The Repeating item will be injected into the template and will be displayed in the Template tab as part of the repeating group created in step 6.
  15. Repeat steps 8 to 13 as many times as necessary to add all the relevant items that should be repeated. 

Repeating_group_Data_Word.gif

 

In Word with an App Connector

Creating adaptive sections in Word using an App Connector can be achieved following these steps: 

  1. In the Template Designer, navigate to the Template tab
  2. Select the table row or a line of text (with or without a bullet) that should contain the items that will be repeated.
  3. Click Add smart field
    This step doesn't apply if you are adding the very first smart field in the template 
  4. Click on Advanced 
  5. Click on Custom repeating group 
  6. Optionally edit the Display Name
    The display name will be displayed in the Template tab once the smart field has been added.
  7. Manually type in the Collection expression for the array containing the items that should be repeated
    For a Collection expression originating from an App Connector, the expecting binding will be {{HostSystem.ArrayName}}
  8. 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. 
  9. Click on Add to template
    The repeating group has been successfully created and will be displayed in the Template tab. The actual items (CurrentItem) that should be repeated inside the document can now be created.
  10. 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
  11. Click Add smart field
  12. Click More
  13. Click Custom text binding (or Custom image binding to insert an image)
  14. Optionally edit the Display Name
    The display name will be displayed in the Template tab once the smart field has been added.
  15. Manually type in the Binding for the item that should be repeated
    For a Binding 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}}
  16. 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. 
  17. Click on Add to template
    The Custom text binding for the CurrentItem  will be injected into the template and will be displayed in the Template tab as part of the repeating group created in step 9.
  18. Repeat steps 11 to 17 as many times as necessary to add all the relevant items that should be repeated. 

Repeating_group_App_Word.gif

 

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: 

Data_from_Salesforce.png

 

 

In PowerPoint with a Data Connector

Creating adaptive sections in PowerPoint using a Data Connector can be achieved following these steps: 

  1. In the Template Designer, navigate to the Template tab
  2. Select the table that should contain the items that will be repeated.
  3. Click Add smart field
    This step doesn't apply if you are adding the very first smart field in the template 
  4. Click on Form responses 
  5. Drill down the data connector question and click on the array represented with RepeatingGroupMedium.svg 
  6. Enter the Display Name
    The display name will be displayed in the Template tab once the smart field has been added.
  7. 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
  8. Click on Add to template
    The repeating group has been successfully created and will be displayed in the Template tab. The actual items (CurrentItem) that should be repeated inside the document can now be created.
  9. 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}}
  10. Repeat step 9 to populate the rest of the cells on the table row
    All CurrentItem elements created on the table must be located in the same table row. 

adaptive_sections_PowerPoint_Data.gif

 

In PowerPoint with an App Connector

Creating adaptive sections in PowerPonint using an App Connector can be achieved following these steps: 

  1. In the Template Designer, navigate to the Template tab
  2. Select the table that should contain the items that will be repeated.
  3. Click Add smart field
    This step doesn't apply if you are adding the very first smart field in the template 
  4. Click on Advanced 
  5. Click on Custom repeating group 
  6. Optionally edit the Display Name
    The display name will be displayed in the Template tab once the smart field has been added.
  7. Manually type in the Collection expression for the array containing the items that should be repeated
    For a Collection expression originating from an App Connector, the expecting binding will be {{HostSystem.ArrayName}}
  8. 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. 
  9. Click on Add to template
    The repeating group has been successfully created and will be displayed in the Template tab. The actual items (CurrentItem) that should be repeated inside the document can now be created.
  10. 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}}
  11. Repeat step 10 to populate the rest of the cells on the table row
    All CurrentItem elements created on the table must be located in the same table row. 

adaptive_sections_PowerPoint_App.gif

 

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: 

Data_from_Salesforce.png

 

Related articles

 

 

dateformat datasources default value data type tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.