Articles in this section

How to insert custom image bindings

This article explains how to insert custom image binding through smart fields so it can populate the dynamic document.

  Prerequisites

  • Library and at least one Dynamics modules enabled.
  • Templafy Desktop and Office VSTO add-in installed on the PC.
  • Space owner access to the Templafy tenant.

  Important

Please note that the Template tab is only available in Word and PowerPoint. Inserting images dynamically into a Spreadsheet for Excel is not supported.

When building a smart template, use the Custom image binding smart field to achieve specific use cases that require more complex bindings. The Custom image binding smart field requires a good understanding of the binding syntax as well as conditions, functions and operators. Through this smart field images can be inserted. Follow these steps to create a Custom image binding smart field: 

  1. In Template Designer, navigate to the Template tab.
  2. Select the location where the smart field should be inserted.
    Word PowerPoint
    Type and select a placeholder text.
  3. Click Add smart field.
    This step doesn't apply if you are adding the very first smart field in the template. 
  4. Click Custom image binding.
    Word PowerPoint
    CustomImageBinding_SelectSmartField.png
  5. Add the Display name.
    The display name will be displayed in the Template tab once the smart field has been added.
  6. Insert the desired binding.
    In this example an App connector (HostSystem) binding is used: {{HostSystem.Product.Image}}
    Word PowerPoint
    CustomImageBinding_SmartField.png
  7. Optionally, perform additional actions on the smart fields: 
    • Inherit Dimensions: The Inherit Dimensions dropdown provides the option to inherit the native width and height of the image:

      • InheritNone: nothing is inherited.
      • InheritWidth: the native width of the image is inherited.
      • InheritHeight: the native height of the image is inherited.
      • Custom inheritDimensions: provide a custom expression to inherit dimensions.
    • Width/Height: The fields Width and Height allow the user to adjust the size of the inserted images by statically defining the values, like '3.75 cm' or by using a binding to define them. The binding can refer to a data source that  contains width and/or height. 
      If only the width is defined, the height will be adjusted and set upon creation, and the other way around. 

        Important

      • Dimension must always be added in centimeters.
      • A decimal must be used as separator (e.g. '3.75 cm').
    • Visibility: Edit the visibility of the smart field based on specific conditions. 
    • Allow updates: Allow the smart field to be updated after its generation when edited by the user through the document content updater. This option will not be visible if the document content updater is not enabled on the smart template.
    • Remove and keep content: This will remove the content control upon document generation and therefor disable the document content updater on this smart field. 
  8. Click Add to template.
    The smart field will be injected into the template and will be displayed in the Template tab:
    Word PowerPoint
    CustomImageBinding_AddedSmartField.png

  Note

  Important

  • Images using a URL are only supported if they can be used without authentication.
  • The Custom image binding smart field only allows inserting images.
conditions custom visibility data mapping tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.