Share via


DataDOMEvent.Operation Property

InfoPath Developer Reference

A read-only property that returns a string value indicating the type of action that is applied to an XML Document Object Model (DOM) node during a data validation event. Read-only

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.Operation

expression   An expression that returns a DataDOMEvent object.

Return Value
String

Remarks

The values that the Operation property returns include Insert, Update, and Delete.

Security Level 0: Can be accessed without restrictions.

Example

In the following example, the Operation property of the DataDOMEvent object is used to check the type of action that is occurring; if it is a delete action, the code calls a custom function:

JScript
  function msoxd__item::OnAfterChange(eventObj)
{
   if (!eventObj.IsUndoRedo && eventObj.Operation == "Delete"
      && eventObj.Site.nodeName == "item" && 
         eventObj.Source.nodeName == "item")
   {
      Calculate();
   }
}

See Also