Back to Technical Support Document Index

FMS DOS: Formatting numbers in Mail Merge using the TRANSFORM() & STUFF() functions

4x 5x

Tech Support Addendum #0117

This document applies only to the DOS versions of the FMS program.

The purpose of this technote is to show how to format numeric fields within Mail Merge so that numbers print with the proper separators (for example 123,456 instead of 123456).

To Format the output in a Mail Merge letter with commas, first bring up your selected letter. If your letter does not already contain the field in question, insert it in the proper location.

How to insert a field in your Mail Merge document

Normally within Mail Merge fields appear surrounded by the curly braces {}.

Such as: {field-name} (Examples: {APN} {PHONE} {ONR_NAME} {ASSD_VAL} )

In order to format numeric fields with commas you must edit the field expression using the TRANSFORM() function in the following manner:

Instead of using just {field-name} (where field-name is the name of the field.) change it to:

{LTRIM(TRANSFORM(field-name,"999,999,999"))}

Example, say the field you wanted to format was ASSD_VAL (the field with the Assessed Value data) you type in:

{LTRIM(TRANSFORM(ASSD_VAL,"999,999,999"))}

If you wanted to add the '$' sign, place it before the first curly brace, i.e. ${LTRIM(TRANSFORM(ASSD_VAL,"999,999,999"))}.


Below is a list of fields in the FMS Farm Database file which are both numeric and can have values large enough to warrant using this function on:

ASSD_VALLOT_SIZE SECOND_TD
BLDG_SQFTTFR_VALLAND_VAL
NUM_UNITSFIRST_TD


To format the PHONE field requires a slightly different technique using the STUFF() function.

Change {PHONE} to read as follows:

({stuff(stuff(phone,7,0,"-"),4,0,")")}

Notice that the left parenthesis is placed to the immediate left just outside the left curly brace.

Using the above expression if PHONE

contains:it will print:
2135551212 (213)555-1212
5551212 ( )555-1212
( )

small office, home office, soho, soho software, real estate agent software, realtor software, mortgage broker software, real estate broker, real estate tax data software, tax roll data software, property data software, real estate property software, real estate database management software, real estate listing software, real estate software, real estate management, lending software, lender software, mortgage software, contact management, listing management, cma sofware, cma report software, closing management, escrow management, escrow software, closing software, closing manager, escrow manager, campaign manager, financial calculator, financial software, refinance software, refinancing software, loan qualification software, amortization software, scheduler software, scheduling software, real estate spreadsheet, settlement sheets, bulk mailing, client management, telemarketing software, real estate database software, mls software, multiple listing service software, scheduler, spreadsheet, settlement sheets, INSTANT IMPACT! GOLD, INSTANT IMPACT!, instant impact gold, Information Products, salesimpact, sales impact, the lenders edge, lenders edge, lender's edge, INSTANT IMPACT! GOLD, INSTANT IMPACT!, instant impact gold, Information Products, salesimpact, sales impact, the lenders edge, lenders edge, lender's edge