Share via


DataDOMEvent.OldValue Property

InfoPath Developer Reference

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. Read-only

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.OldValue

expression   An expression that returns a DataDOMEvent object.

Return Value
Variant

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.

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.

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:

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

See Also