This guide will show you how to format a mapped number field (such as controlling the number of decimal places) in a HR letter/document template.
Contents
Overview
- You may find when mapping fields (in the same manner as mail merge fields) in HR letter document templates that you wish to change the outputted format of the merged document(s), such as removing the decimal places on a salary.
- Formatting can be applied to a field using a Microsoft Word formula in the template document. This guide will show you how to amend numerical formats in Word, but if you are confident in this area you may wish to explore other formulae you are using with mail merge.
| Note: Please see the Date format guide for help with date fields. |
To add a formatted number field to a letter/document template
- Open your template in Microsoft Word
- Navigate to Insert in the top navigation bar and click Quick Parts
- Click on the Field option
- Leave the selection on the left-hand side as it currently is and click on Formula
-
Fill out the Formula and Number Format boxes as displayed in the example on the left (note remove the = sign that appears initially, and the spacing must be exactly as shown), adding the name of your field within the curly brackets (eg you might use {Salary} to replace the {Hours} shown in the example, but the field name must not contain spaces and both field references in curly brackets must match)
-
Example Formula for a pay field: IF {Salary} 0{Salary} 0
- As with normal letter fields, the field name doesn’t have to match the system field name, as long as you can identify it to map it correctly when you upload the template
- The Number format can be chosen from the list below
- 0 for rounded whole numbers
- 0.00 if you want to round the number to two decimal places
- ,0 for rounded whole numbers with a thousands separator, or ,0.00 etc to add decimal places
- Then click OK
- The field will display on your document as shown above (or whichever number format you chose), rather than the mapped field name. Insert the field where you want it to go in your letter
- In the example below of a pay review letter, the formatted field can be seen shaded grey which has been formatted to show no decimal places and a thousands separator comma
- You do not need to make any further amendments to the field, as when you upload your template and map the fields, the names in curly brackets in the formula will display so you can then map the relevant field as normal and your chosen formatting will apply
- If you want to check the formula in the field in your Word document, you can press Alt and F9 together to toggle between formula and normal view. The formula can now be seen shaded grey in the example below:
- Right click in the grey area if you wish to edit your formula which will take you back to the Field menu so you can amend the text in the top right line. The section in quotes at the end is your chosen Number Format: eg "0.00" if you wish to add two decimal places. Click OK to save any changes
| Note: Your Word document must be in normal (non-formula view) mode (click Alt and F9 to toggle between views) when you upload the template to be able to map the fields. |
- When you have uploaded your template and distribute your letter(s) you will see the fields merged in the desired format. Example below is using ",0" for thousand separator with no decimal places.
Footer
| Tip: Click the link below to download our field format helper to copy and amend suggested formats. This also includes Date formatting options. |
Comments
0 comments
Article is closed for comments.