• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/Formatting fields in DocumentsCorePack templates (field properties)

Formatting fields in DocumentsCorePack templates (field properties)

2494 views 0 Updated on August 8, 2023

When mapping fields from Dynamics 365 (Dataverse), you might need to show the data in a specific format, for example, currency or date formats. This article outlines how to set the format of fields inside a DocumentsCorePack (DCP) template.
.
In addition to simply using the format defined in Dynamics 365, custom format options can be directly set via the Field properties from the mscrm-addons.com tab.

Depending on the type of field, different format options are provided:

  1. Number and money fields
  2. Date and time fields
  3. Delete line/row if whole line/row is empty & Delete line/row if a field is empty
  4. Two Options & OptionSets
  5. General Formatting in Microsoft Word

.

1. Number and money fields

Follow this step-by-step description to learn how to set the format of number and money fields.

Step 1. Open a Word document and navigate to the ❶ mscrm-addons.com tab. Now place the ❷ cursor in the field you want to format. Click on the ❸ Field properties to open the options. In this example, we have a detail from an invoice, where the currency needs to be adjusted to the country of the customer.

The Field properties.
Figure 1: Open Field properties

Step 2. The Field properties window will pop up. The section ❶ Field properties contains the:

  • Name (of the field)
  • Relation

The section ❷ Formatting options offers the possibility to display the currency in the respective currency of the country. Learn more about Culture Information in DCP here.

❸ Use internal value:  When defining a custom format, it is required to ensure that the formatting is applied to the plain value (for example, 10000 instead of the formatted value € 10,000.00). Hence, this setting is automatically checked when defining a format within the Field properties.

The "Use Internal Value" option in the Field properties dialog.
Figure 2: Field properties window

Step 3. In the Formatting options, you have to first select the ❶ Culture so that the respective formats for this culture are displayed. Click on the drop-down to select the one you want to apply.

The "Culture" formatting options.
Figure 3: Formatting options – Culture

Step 4. It is then possible to choose the respective ❷ Format to the Culture. As you can see in Figure 4, all Standard Formats are listed. After your selection, the result is displayed in the ❸ Example section. Confirm with OK.

.

Choose the respective format option.
Figure 4: Formatting options – Format, Example

2. Date and Time fields

This section shows the formatting options for DateTime fields within the Field properties of the mscrm–addons.com tab.

Step 1. In this example, we have a detail from an invoice, where the date needs to be adjusted to the country of the customer. Place the cursor in the respective field and click the Field properties.

The section ❶ Field properties contains the:

  • Name (of the field)
  • Relation

The section ❷ Formatting options offers the possibility to display the Date and Time in the respective culture of the country. Learn more about Custom Date and Time Format Strings in DCP here.

❸ Use internal value: Check this box when you use the Formatting options to take over individual formatting for this specific field, and not taken from Dynamics 365.

The Field properties window.
Figure 2: Field properties window

Step 2. Let´s have a closer look at the Formatting options. First, select the ❶ Culture so that the respective formats for this culture are displayed. Click on the drop-down to select the one you want to apply.

Make a selection from the formatting options.
Figure 3: Formatting options – Culture

Step 3: It is then possible to choose the respective ❷ Format to the Culture. As you can see in Figure 4, all Standard Formats are listed. After your selection, the result is displayed in the ❸ Example section. Confirm with OK.

Choose the respective format.
Figure 4: Formatting options – Format, Example

.

3. Delete line/row if whole line/row is empty & Delete line/row if a field is empty

To keep your documents compact, it is recommended to avoid empty lines within your documents. For example, think of an address block where some customers use the Address Line 2 field, but others do not. To ensure a compact output, you want to avoid empty lines for those who do not use the field.

There are two options:

  1. Delete line/row if whole line/row is empty: If the value of the selected field, as well as all other fields within the same line, are empty in DataVerse, the line will be removed.
  2. Delete line/row if this field is empty: If the value of the selected field is empty, the whole line is removed independent of other content in the same line.

How it works

Open a Word document and navigate to the ❶ mscrm-addons.com tab. Place the cursor in the field you want to format. Click on the Field properties to open the options.

If the value of the selected field and all other fields within the same row in DataVerse are empty, take Option A.

If you need the whole line removed when only one selected field is empty, take Option B.

Select Option A or Option B.
Figure 5: Select Option A or Option B 

Sample result:

Sample result.

.

4.  Two Options & OptionSets

For OptionSets (Two Options), the properties allow you to either use the internal value or display of the selected option.

Use internal value: When defining a custom format, it is required to ensure that the formatting is applied to the plain value, for example, 10000 instead of the formatted value € 10,000.00. Hence, this setting is automatically checked when defining a format within the Field properties.

The "Use Internal Value" option.
Figure 6: Use internal value

.

5.  General Formatting in Microsoft Word

Word provides different options to format fields. The following article provides an overview on possibilities provided.

That’s it! We appreciate your feedback! Please share your thoughts by sending an e-Mail to support@mscrm-addons.com.

Was this helpful?

Yes  No
Related Articles
  • Ensuring correct time zone display for DateTime fields
  • How to compare a date-fields with the current date 
  • Create a template for XML or plain text
  • E-Invoicing with DocumentsCorePack
  • How to add content from SharePoint to a document
  • Using MS Word field codes in DocumentsCorePack templates
Latest Articles
  • Buried in Storage Fees? Here’s How to Cut Dynamics 365 Costs Fast
  • Why Document Generation Is Still the Most Broken Part of Your CRM Workflow
  • Recap: DynamicsMinds 2025
  • How to migrate One-Click-Actions (OCAs) between environments
  • Document Generation via Copilot in Dynamics 365 Sales using DocumentsCorePack
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How to find your environment’s unique name in Microsoft Dynamics 365
  • How licenses are counted
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How licenses are counted
  • How to insert Condition Fields in DocumentsCorePack Templates designer
Categories
  • *News and General Infos* 63
  • Webinars 45
  • Template Designer(DCP 196
  • DocumentsCorePack(DCP 253
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 73
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2022 www.mscrm-addons.com. All Rights Reserved.