Instructions for Use
It is strongly recommended to have a loan open
prior to launching the Code Wizard.
The Test feature will not be available without a loan open.
1. The name of the Business Rule being
2. Auto Format – button to auto-indent
the code, making it easier to understand the logic, branching, and nesting. See examples below.
3. Check for Errors - After making changes, click to check for misspellings, missing or extra parentheses, etc. See examples below.
4. Strong Check - Leave Strong Check
selected. Displays an error if fields are
used with wrong functions for the field data type.
I.e. .AddDays(1), [#2].StartsWith("Test") or [@763].Contains("Test”).
5. Strict Check - only use if working
with SDK/PlugIn code.
6. Test - click to simulate how the
code would run and the results for the current loan data.
See examples below.
7. Help – displays help with the
various sections of the Tool.
8. Field Values – displays the values
of fields in the code from the currently open loan. If there was no loan open when the Tool was
launched, each field will display “No Loan”.
9. Functions - Searchable List of
~ 200 standard functions.
I.e. InStr(), DateDiff(), XdateDiff(), IsEmpty(), IsDate(), LCase(), UCase(), Milestones.SetComplete(), etc..
10. Other Code - Searchable List of
code from other Biz Rules in the same category (i.e. Calculations, Field
Triggers, Field Data Entry, …).
Code can be easily copied from this list to be used in the current field or rule.
11. Simulator – if a loan was open when
the Tool was launched, current field values are displayed. Field values can be changed for testing
without affecting the actual field values in the current loan.
12. Reset – resets the Simulator field
values to the current values from the loan.
Using Test / Simulator
Testing mode, using the Simulator is an extremely powerful feature of the Code
Wizard. It can save Administrators hours
when developing and testing calculated fields, rule filters, and advanced code
in business rules. Without this feature, an administrator may need to create a
custom form with the new calculated field, and change the loan values, save,
close, reopen the loan to test various scenarios. The Simulator allows the administrator to
test various scenarios without affecting the actual values in the current loan.
an example of a custom calculated field that compares the current Mortgage
Insurance amount to the amount that was previously disclosed, which was stored
in another custom field. If there is no
previously disclosed amount, the field should evaluate to “NA”. If the amounts match the field should
evaluate to “Unchanged”, otherwise it should evaluate to “CHANGED”.
Scenario 1 – No previously disclosed MI.
Scenario 2 – Current MI matches the previously disclosed amount.
1. Admin changes 
2. Admin changes [CX.MI.DISCLOSED]
3. Admin clicks the “Run Calculation
4. “Calculated Value” displays the
result, “Unchanged”, as expected.
Scenario 3 – MI amount changed
1. Admin changes 
2. Admin clicks the “Run Calculation
3. “Calculated Value” displays the
result, “CHANGED”, as expected.
Code Wizard to author and test the above scenarios, the administrator is able
to test various combinations of values without changing the actual data in the
loan being used. If an error is
discovered, the administrator can change the code in the left pane and
immediately test it in the Simulator. This can save multiple hours when
designing complex code with a large number of variables.
Auto Format Code
Auto Format Code makes code significantly easier to read. Unformatted Encompass code can be difficult to analyze. Formatting helps with assessing the logic
flow of the code.
Field Calculation and Biz Rule Condition code is also
split into multiple lines with proper indentation which adds extra clarity.
Example of formatting and checking Field Calculation
Checking for Errors
Check for Errors compiles the code to see if any
errors are reported by the code compiler. If there are no errors, you will see a “Success” message. Otherwise, an error list is displayed. You can click on any error in the list to see
the line which failed.
This is especially useful
with Auto-Formatted Field Calculation and Condition Code. Whensuch calculation code is
split into multiple lines, this will lead you to the actual part which contains
the error as opposed to a generic error message displayed by Encompass.
Use of Intellisense to autofill fields and enumerations
IntelliSense is a utility that aids an administrator
when authoring calculation coding. IntelliSense is invoked when you start
typing ‘[‘. A list of fields already in the code is
displayed. At the end of the list
appears “Find Fields” which allows
searching fields by keywords. If a field
has options, they will be presented in another IntelliSense prompt after
pressing ‘”’. Examples below:
IntelliSense is also helpful for Global functions such
as InStr(), CStr(), Trim(), …