cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Get Drawloop to render 4 decimal places on a field in Word Template.

Using a Word template with Drawloop, and displaying a field (from a Salesforce object) that has 4 decimal places. Only 2 of the 4 decimal places are being rendered.  How do I need to treat the field to render all 4 decimal places?

0 Kudos
Reply
7 Replies
Workflow Hero

Re: Get Drawloop to render 4 decimal places on a field in Word Template.

Hey John,

I don't know if I can help here, but I'm curious as to the setup your have. I use formatting in Word to limit the number of decimals that are displayed, but all the decimals in the field have always been included.

Do you have the tag in a mergefield of some sort already?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Get Drawloop to render 4 decimal places on a field in Word Template.

In the Word template, I have a table defined as follows, with Drawloop tags specified as <<field>>:




State

WC Code

WC Rate

WC Description


<<Workers_Comp_Calcs_Start>> <<Workers_Comp_Calcs_State_Code>>

<<Workers_Comp_Calcs_WC_Code>>

<<Workers_Comp_Calcs_WC_Rate>>

<<Workers_Comp_Calcs_Description>>



The field called <<Workers_Comp_Calcs_WC_Rate>> (WC Rate) in the 3rd cell is defined with 4 decimal places. Drawloop renders the value with only 2 decimal places. I need to understand where to control the number of decimal places rendered.

Thanks,

John

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Get Drawloop to render 4 decimal places on a field in Word Template.

I believe that the number of decimals is governed by the Salesforce field, is the <<Workers_Comp_Calcs_WC_Rate>> set to hold 4 decimals?

(You can definitely force word to add additional decimal spaces by formatting the field to 4, but if in Salesforce the field only has 2 decimals it will just add 0's to the end.)

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Get Drawloop to render 4 decimal places on a field in Word Template.

Yes, as I said the field is defined with 4 decimal places in Salesforce.

This rendering problem “resolved itself” yesterday when I re-published the template document. (Yeah, that was interesting!) So consider the issue closed.

Thanks you!

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Get Drawloop to render 4 decimal places on a field in Word Template.

You did, sorry about that...

Glad its working now!

Accept as Solution Reply
Workflow Hero

Re: Get Drawloop to render 4 decimal places on a field in Word Template.

Hey Yisroel,

Can you please send me the format to force adding the decimal in the mail merge for the currencies field.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Get Drawloop to render 4 decimal places on a field in Word Template.

Hey Yuvraj Ganesan‌,

You add a MS Word mergefield and use standard Word formatting.
So you'd use Shift+F9 to add the mergefield, and then add the word MERGEFIELD before your Salesforce tag and then \# with a format after the tag.

Here are two examples of how 1234.567 in salesforce will show using different merge formatting:

{ MERGEFIELD <<Your_Field_Here>> \# 0.00000 }  will show as 1234.56700

{ MERGEFIELD <<Your_Field_Here>> \# $,0.00 } will show as $1,234.57

(there are many many options for different requirements you may have, just search for MS word picture switches)

0 Kudos
Accept as Solution Reply