DataCommit Event

The DataCommit event is fired whenever Encompass360 needs to save modified data from a control into the underlying loan file. You can use this event to modify the default behavior of how data is saved. For example, the value saved into the loan can be derived from the user's input into a text field instead of being the actual value typed into the field.

Note: EventArgs describe the properties which can be read and/or written in order to affect the outcome of the event.

Supported By:

 

DataCommit events are supported by check boxes, dropdown boxes, dropdown edit boxes, radio buttons, text boxes, and multi-line text boxes.

 

 

 

 

 

 

EventArgs Properties:

Cancel

Boolean

Read/Write

Set this property to True if you have overridden the default data commit behavior or to prevent the default data commit action from occurring.

Value

String

Read/Write

The underlying data value which will be committed to the loan. Modify this value to change the value that will be committed.

 

 

 

 

 

 

Example:

 

 

The following code assumes that a text box is placed on the form and associated with Field 981 (line item M1 from the Declarations section on Page 3 of the 1003). The underlying field can take on one of the following values:

  • PrimaryResidence

 

  • SecondaryResidence

 

 

 

  • Investment

 

 

 

However, we want the text box to display "PR", "SH", or "IP" for these values. To achieve this, override the DataCommit events to translate between the underlying field value and the displayed value. For example, you can add the following code to the control's DataCommit event:

 

 

 

If EventArgs.Value = "PR" then

EventArgs.Value = "PrimaryResidence"

Else If EventArgs.Value = "SH" then

EventArgs.Value = "SecondaryResidence"

Else If EventArgs.Value = "IP" then

EventArgs.Value = "Investment"

Else

 

 

EventArgs.Value = ""

End If