About this article
The intention of this article is to troubleshoot Dynamics issues. In many cases the validation in Template Designer or the Admin Center shows an error message if a template is configured incorrectly. However if no error message is shown this guide can help you to find a solution.
- Generic issues
- Creating a new template or uploading a template fails
- Fields are not shown on the Template tab
- Creating a document
- Formatting is not applied to content control
- Share value is not working
- Filtering dropdown is not working
- Values in a table are shown twice
- Image field is empty
- Creating document failed error message
- The asset you are trying to access does not exist or is not available to you
- Updating a document
- The Update Document button is not available
- Dynamic bindings in the document are not updated
- Document update failed
Generic issues
Creating a new template or uploading a template fails
When you open Template Designer the message Generated by Templafy
is shown, or when you upload a template to the Admin Center the message Processing document failed
(Word document) or Processing presentation failed
(PowerPoint presentation) is shown:
This happens when the document has been generated with Templafy. A generated document contains document specific information, like the document properties TemplafyTenantId, TemplafyTemplateId and TemplafyUserProfileId. You should not use a document (that contains document specific information) as base for a template.
The recommended solution is that the administrator downloads the original template from the Admin Center, makes the desired changes and then replaces the current version.
|
If you want to create a new template from scratch then always choose MS Themes
-> Blank Document
(or Blank Presentation
).
Do not use Create a blank <company name> document
(or presentation
) on the Home
tab, as this will create a Templafy document/presentation and you'll get the same message shown above.
Fields are not shown on the Template tab
In PowerPoint the template e.g. contains a Title, Subtitle and UserProfile.DisplayName shape, but in the task pane on the Template tab only the field UserProfile.DisplayName
is shown:
This occurs when shapes are grouped. Templafy only shows ungrouped shapes. When you ungroup the shapes (in this example the Title and Subtitle field) all fields are shown in the task pane:
|
Binding errors
Validation error in Template Designer
When inserting a smart field via e.g. Form responses
this works without any issues, because you just have to click the field you want to use, but if you want to insert a field via e.g. Custom text binding
or Custom image binding
you have to type a binding yourself, which can cause error messages like this:
The 'error at position 2-19' in the example above means that the error begins at character '2' and ends at character '19' (note that counting starts with '0'):
- Expression UserProfile has a type UserProfileType which does not contain member with name <name>: In this case it means that the User Profile doesn't contain a form field named 'Office'.
-
Expression does not evaluate to a type String: The (correct) column name is not used in the binding. For example the binding
{{UserProfile.Office}}
is used while it should be{{UserProfile.Office.Name}}
.
Validation error in Admin Center
The Admin Center validates a template when you upload or replace it. It shows Processing this document failed
for Word templates or Processing this presentation failed
for PowerPoint templates and below the cause of the validation error:
For example these error messages can be shown:
-
A malformed URI was found in the document: the template contains an incorrect hyperlink (URL/mailto). Fix the incorrect hyperlink(s) in the template:
- Expression UserProfile has a type UserProfileType which does not contain member with name <name>: the User Profile doesn't contain a form field named '<name>'.
- Missing data source: <data source name>: restore the missing data source.
- Nested repeating groups are not supported: remove the nested repeating groups (adaptive sections) and create separate repeating groups.
- Text elements are not supported inside repeating groups: Remove text element insertion within repeating groups (adaptive sections).
-
The asset requires module Dynamics Templates to be enabled: ask Templafy to activate the module if it was purchased (after this is done you need to click
Reprocess
in the Admin Center), or remove Dynamics functionality (bindings, form fields etc.) from the template if the module wasn't purchased. -
Updating document is not supported for documents with repeating groups: Disable
Document content updater
if a template contains repeating groups (adaptive sections).
|
Content elements
When uploading or replacing a template this message can be shown:
A template with a large amount of XML may cause performance implications, which is why we have set a limit and cannot support templates exceeding this limit.
|
This is most often happening on PowerPoint presentations containing a lot of shapes that can be edited by the end-user (world maps for example). In this case, we recommend:
- The shapes do not need to be edited by the end-user: replace the content elements (shapes) with a picture. You can do so by copying the group of shapes and pasting it as a picture.
- The shapes do require to be edited by the end-user: split the presentation into several smaller ones so it fits into the maximum allowed number of content-elements.
Creating a document
Formatting is not applied to content control
In a template the content control of a Templafy field is set to e.g. show bold+italic text, but when a user creates a document, the text is not bold+italic.
This can occur if no placeholder text is used when adding a smart field to a template.
For example, a 'Subject' field is created and then added to the template by clicking Add to template
:
The Display name is shown in grey text when no placeholder text is used (1). Then the formatting of the content control is changed to bold+italic (2), but the result (when a document is created) is that 'hello world' is not bold+italic. Note that even the font size has become smaller (3):
The solution is to (always) use a placeholder text. In this case the Display name shows the placeholder text '[Subject]' (1). Then the formatting of the content control is changed to bold+italic (2), and this time the result is that 'hello world' is shown in bold+italic text (in the correct font size) as expected:
Share value is not working
The option Share value
is used to display a form field only once, even if the form field is used multiple times. For example the form field is used in a document (template), but the same form field is also used in a text element that is dynamically inserted into the document.
This can occur in these situations:
- The option
Share value
is only enabled in the template or text element. The optionShare value
only works when it's enabled in both the template and text element. - The name of the form field in the template and text element is different. The form type and name should be the same. For dropdowns make sure the same data source and column are used.
Filtering dropdown is not working
This can occur when data sources are not configured correctly. To be able to use field A to filter field B, the data source for field A needs to be a reference in the data source used for field B.
For example if you want to filter a city (dropdown) based on a country (dropdown), you need to have a separate Country data source and used that as a reference in the City data source.
Values in a table are shown twice
A table contains for example only one Address field, but in the created document the address is shown twice:
This can occur when the Text wrapping
is set to Around
(marked red):
Change the setting to None
(marked green). Note that you now have no text wrapping! If you need text wrapping, then the solution is to replace the Table by a Shape.
Image field is empty
In the document an empty image field is shown:
This can occur if a data source record (intentionally) contains no image. To solve it use a dummy image file for this record (e.g. 'dummy.png') that consists of 1 (white or transparent) pixel.
Creating document failed error message
When creating a document the message Creating document failed
and/or Failed
is shown:
The Failed
message often contains a 'Tracking id', that shows detailed information about what went wrong. For example:
-
Invalid measure unit string value. (Parameter 'stringValue'): An
Image Header
has e.g. the binding{{UserProfile.Office.Logo.LeftOffset}}
in theLeft Offset
field. In the data source theLeftOffset
column contains e.g. the value '3.75'. The error is shown because the measure unit (centimeters) is missing. Change '3.75' to '3.75 cm'.
The asset you are trying to access does not exist or is not available to you
This error message can be shown in these situations:
- In the header or footer of a Word template both the first page and
Different first page
contain a binding to the same text element. Delete one of the bindings. - A text element used in a template does not have a placeholder (on the Template tab the
Placeholder
field is empty). Add a placeholder. If that doesn't solve the issue, then delete the content control in the template and recreate the binding to the text element. -
In Word
Restrict Editing
is enabled (with 'Filling in forms' allowed). This is not supported by Templafy. DisableRestrict Editing
.
Updating a document
The Update Document button is not available
This can occur in these situations:
- In the template
Document content updater
is not enabled. In Template Designer openSettings
and enableDocument content updater
. - You are using a different MSI than the tenant you are creating the document from.
This is expected behavior. Always use the correct MSI, for example if you switch between a test and production tenant.
Dynamic bindings in the document are not updated
This can occur in these situations:
-
Text element (fixed part of template): if the option
Replace On Update
on the Template tab is not enabled then values of form fields still will be updated, but if the content of the text element has changed (e.g. in the Admin Center the original version is replace by a new version) this will not be updated. -
Text element (inserted via dropdown): if the option
Replace On Update
on the Template tab is not enabled then the dropdown will not be shown anymore. For example if the user can choose to Yes/No insert a text element and chooses 'No', then it's not possible anymore (after the document is created) to change it to 'Yes'. If you want the user to be able to change the answer thenReplace On Update
needs to be enabled. -
Text or Image binding: if the option
Allow updates
is not checked. There are 3 possible settings:- Only
Allow updates
is checked: values are updated. - Only
Remove And Keep Content
is checked: values are not updated, because the content control is removed (the value now has become plain text). - Both
Allow updates
andRemove and Keep Content
are not checked: values are not updated.
- Only
-
Visibility binding: In the
Visibility expression
fieldVisibilityType.Delete
is used. If a content control is deleted updating is not possible anymore. UseVisibilityType.Hidden
instead.
|
Document update failed
Creating a document works as expected, but when you try to update the document the message Document update failed
is shown:
This can occur in these situations:
- When a 2 letter code like
en
orfr
is used in the Proofing Language field. Only 4 letter codes likeen-US
orfr-FR
are supported. -
The template contains a corrupt field. For example an image field should show the icon marked green below, but instead it shows the icon marked red. Delete the field and create a new one.
-
In Word
Restrict Editing
is enabled. This is not supported by Templafy. DisableRestrict Editing
.
Text Elements
When you upload or replace a text element the error message TextElement<number> cannot be inline text
can be shown:
This means the template contains a text element content control inside a sentence (marked red below). This is not supported, the content control needs to be created in it's own paragraph (marked green) or table cell:
A correctly used text element content control can be recognized by two (start and end) textElement
tags (when Design Mode is enabled).
When it's not used correctly it will only have one (start) textElement
tag (marked red above). Deleting the sentence will not solve the issue: the end tag is deleted permanently. The solution is to delete the current content control and create a new one.
Languages and Translations
Translations are not working
This can occur in these situations:
- There's a mismatch between the binding and the data source. For example the binding is
{{Translate("Subject")}}
but the name in the data source is"Subject "
. The extra space creates a mismatch. As result the value in the Name column is used. Verify the value is written correctly (note that it is also case sensitive). - If the column name parameter is not used, then e.g.
{{Translate("Subject")}}
assumes the user profile contains a Language dropdown namedDocumentLanguage
. When a different name is used (which is not recommended) then you need to add the column name parameter, e.g.{{Translate("Subject", Language)}}
. So either rename the user profile field toDocumentLanguage
or specify the different name in the binding.
Proofing language is not working
This can occur in these situations:
- The language is not available in the Languages data source. Add the correct language.
- If the binding
{{DocumentLanguage}}
is used in theLanguage
field on the Advanced tab, but the user profile does not contain a Language dropdown namedDocumentLanguage
. So either rename the user profile field toDocumentLanguage
or specify the different name in the binding.
Related articles
Comments
0 comments
Article is closed for comments.