We will be discussing about the Advanced Coding used for creating Encompass 360 Business Rule in this article. Business rules can include a condition or an Advanced Coding under which the rule applies. Advanced Coding and Conditions come in handy when creating a business rules in Encompass.
Advanced Coding
- It is used to create our own custom expression when the pre-defined conditions types do not serve purpose.
- In addition to custom coding for conditions, we can also create custom code within the Milestone Completion, Field Data Entry, Field Triggers, and Loan Form Printing business rules.
- It requires knowledge on Visual Basic .Net, Advanced Condition Editor and Loan Custom Field Calculations
Visual Basic
The advance coding business rule syntax is built on top of the Visual Basic .NET programming language.
Advanced Condition Editor
The Advanced Conditions category of business rules provides the Advanced Condition Editor to create expressions to define custom conditions. This tool allows you to create a filter which writes the Visual Basic code for you.
Loan Custom Field Calculations
The advance coding business rule syntax also leverages the capabilities of the Encompass 360 Custom Field Calculation engine which provides the ability to create calculations for both pre-defined and user-defined custom field IDs. In addition, the same calculations can be used in various places within the advanced code.
How to Create an Advanced Coding for Encompass 360:
1. On the menu bar, click Encompass, and then click Settings.
2. On the left panel, click Business Rules, and then click Field Data Entry.
3. On the Field Data Entry tool, click the New icon.
4. Type the name of the rule.
5. Select the channels where the rule will be applied.
6. Select No to always apply the rule.
7. Click Add.
8. On the Field Rule window, type the Field ID that the Value will apply to Or, click Find to select the field from an input form.
• Select a form from the list on the left, right-click to select the field the rule will apply to, and then click OK.
9. Click the Value Rule tab and click Advanced Coding for the rule type.
10. Enter code to define the valid field values.

Example:
Let us see an example on how to use Advanced Coding for a Field Data Entry Rule.
Rule: If [Document.DateReceived.Appraisal] is not empty and 1821 is empty, then Fail (“Appraisal Received Date is complete but Estimated Value is zero”)
As per this rule, the Estimated Value or field# [1821] is empty or equivalent to zero, but the Appraisal Document received date or field# [ Document.DateReceived.APPRAISAL] is not empty. The Milestone cannot be completed with the incomplete Estimated Value Field even when the Appraisal Document received Date is filled in.
When creating the code for an advanced business rule, we are writing a VB.NET subroutine, in which you can use all of the language constructs of VB.NET to make the determination of whether the value input by the user is valid for the corresponding field. The following example will form the basis of the discussion of how to implement a custom business rule.
Advanced Coding for this rule is:
If (NOT IsEmpty([Document.DateReceived.Appraisal]) AND ([#1821] = 0) Then
Fail(“Appraisal Received Date is complete but Appraised Value is zero”)
End If
If…then…End If
The conditional syntax, If….then…End If, is taken directly from VB.NET and demonstrates the fact that VB.NET language elements can be employed without any special coding within your rule.
We have created the Advanced Coding for the field “Estimated Value or ([#1821]” with Pre required Field as “Appraisal Document received date or field# [ Document.DateReceived.APPRAISAL]”.

To know about the Advanced Conditions, please refer Advanced Conditions for Encompass 360 Business Rules.
Take Five Consulting is a technology company, based in Virginia U.S., that specializes in the Mortgage Banking vertical especially LOS implementation and application development. Take Five Consulting creates and implement mortgage technology and software specifically for Mortgage Industry.