Formula 5

Operators/Functions Used

Nested formulas, If-Then-Else, Subtract (-), Not equal to (<>), Less than (<), Concatenate (+), ToText, To dollar ($), Negate (-()), Parentheses ()

Formula Purpose

A company wants to stimulate new credit sales for those customers with open credit limits and to make customers who are over their limits aware of their over-limit balances. To do this the company wants to include a brief "PS" to its already customized (company name, contact name, etc.) sales letter to each customer.

Formula

If {file.CREDIT LIMIT} - {file.BALANCE} <> 0 Then
    If {file.CREDIT LIMIT} - {file.BALANCE} <0 Then
        "Your account is currently $" +
        ToText($ (-{file.CREDIT LIMIT}
        - {file.BALANCE}))
        + " over limit. Please contact us if you would
        like to discuss an increase in your credit limit."
    Else
        "Your account has $" + ToText($({file.CREDIT LIMIT}
        -{file.BALANCE})) + " available credit.
        You can order today with no additional paperwork!"
Else
    ""

Result

CreditLimit Balance Result

$5000

$2250

"Your account has $2750.00 available credit. You can order today with no additional paperwork!"

$3000

$3457

"Your account is currently $457.00 over limit. Please contact us if you would like to discuss an increase in your credit line."

$7500

$7500

«no message»

Explanation

Comments

Note the leading space in the string " over limit." Note too, the leading space in the string
" available credit." These spaces are purposely entered into the formula so a space occurs between the dollar figure and the words in each message.

Related topics

Formulas In Action



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com