One of the benefits of using inspections with DocumentsCorePack (DCP) is that you can overcome certain limitations of the default export to PDF functionality. For example, when exporting an inspection as a PDF with DCP, you can set the formatting capability for values.
This article covers formatting, advanced settings and translation for inspection fields. For more general information about this feature, you can find details here: Working with Field Service Inspection responses.
Formatting
An inspection field consists of a parent container and several sub elements. The other elements are outlined below.
- The table row represents a question with an answer.
- The <<index>> field is the number of the question.
- The <<title>> field contains the question itself.
- The <<value>> field contains the answers.
- For all these fields you can use the standard Word formatting options. The <<value>> field also can contain data like dates or numbers, so you have additional formatting options here.
To open the properties, you have to place the cursor inside the <<value>> field ❶ and use the “Field properties” button ❷ (also available in the Word menu).
The Inspection Properties Dialog will appear and give several more options. Here you can set the value formatting for each supported/needed data type.
❶ Number Fields
This setup is the same as with standard fields. View this article for more information.
❷ Date and Time fields
This setup is the same as with standard fields. View this article for more information.
❸ Picture Size
Here you can define the required size of pictures for inserted images. You can do this with the auto setting, or by defining a max width and a max height. Please note: You can only set the width or height to the auto setting, not both.
❹ Matrix Table
You can define table formatting by using a custom style sheet for tables.
Advanced settings
An inspection response does not follow the standard table-row model (entity-record model) of Microsoft Dataverse. The actual data is stored in fields as blocks of JSON data and these two elements are only loosely bound.
Due to this, there are additional field properties set in the parent inspection field. To open the properties, place the cursor inside the parent control ❶ and use the “Field properties” button ❷. (also available in the context menu of Word).
The Inspection Properties dialog will show you three advanced settings for specific fields. Those fields are automatically set when using “Insert as Inspection”, and you usually do not have to change anything here.
❶Result
The result holds the actual JSON data for all numbers and answers to questions. By default we try to fill this field with the “ResponsJsonContent” [sic] of the Inspection Response table.
❷Template
The template holds the actual JSON data for the questions. By default we try to fill this field with the “JsonContent” [sic] of the Inspection Template table.
❸ID
The ID is required when pictures are used. By default we try to fill this field with the “InpsectionResponse” [sic] of the Inspection Response table.
Translation
Another beneficial feature of inspections is the capability of translation. If you need to create a template that must pull the inspection response in a specific language, you can use the template property template specific language.
That’s all about inspection response formatting and advanced settings! We appreciate your feedback! Please share your thoughts by sending us an email to support@mscrm-addons.com!
Related Articles
Working with Field Service Inspection responses
How do I create relationships using DocumentsCorePack Template Designer
How to set a specific language in your template
External Links
Add inspections to work orders in Dynamics 365 Field Service