OldValue Property

Microsoft Office InfoPath

A read-only property that returns a string value indicating the original value of an XML Document Object Model (DOM) node that is being updated or deleted during a data validation event.

expression.OldValue

expression    Required. Returns a reference to the DataDOMEvent object.

Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Remarks

The OldValue property contains the original value of the XML DOM node that will be replaced with a new value or deleted. To get the new value of the XML DOM node, use the NewValue property of the DataDOMEvent object.

Example

In the following example, the OldValue property of the DataDOMEvent object is used to display the original value of an XML DOM node, along with its new value:

XDocument.UI.Alert("Original value: " + eventObj.OldValue +
   "\nNew value: " + eventObj.NewValue);