Template Math

Introduction

LoanPro provides some basic functions that can be used to perform basic mathematical operations. To use one of these functions, you will need to know the function name and parameters. For most of these functions, at least one of the parameters will usually be a variable name. This article will go over the names and parameters of each function and show an example of how to use each one.

The available functions are:

• mathSubtract()
• mathMultiply()
• mathDivide()
• mathSqrt()
• mathPow()
• evalFormula()

This function lets you add two numbers together.

 Function Parameter 1 Parameter 2 mathAdd() Number Number

Example:

This will output the loan amount plus the underwriting fee. So, if the loan amount was $10,000 and the underwriting fee was$150,  this will output 10150.

Subtraction

This function allows you to subtract one number from another.

 Function Parameter 1 Parameter 2 mathSubtract() Number Number

Parameter 2 will be subtracted from parameter 1, so the result will be negative if parameter 2 is the larger number.

Example:

[[mathSubtract(‘setup-loan-amount’, ‘setup-underwriting’)]]

This will output the difference between the loan amount and the underwriting fee. So, if the loan amount was $10,000 and the underwriting fee was$150, this will output 9850.

Multiplication

This function will let you multiply two numbers.

 Function Parameter 1 Parameter 2 mathMultiply() Number Number

Example:

[[mathMultiply(‘setup-loan-amount’, 10)]]

Square Root

This function will let you find the square root of a number.

 Function Parameter mathSqrt() Number

Example:

[[mathSqrt(‘setup-loan-amount’)]]

Evaluate Formula

When you enter a formula as a string into the function it will be evaluated.

 Function Parameter evalFormula() String

Example

[[evalFormula('(+ status-amount-due 50000 setup-loan-amount)')]]

This will output the amount past due + 50000 + the loan amount. So, if the amount due is $320.00 and the loan amount is$10,000 the output will be 60320.