|InfoPath Developer Reference|
Version Added: InfoPath 2003
expression An expression that returns a XDocument object.
|pEvent||Required||MergeEvent||An event object that is used during an OnMergeRequest event.|
If the ReturnStatus property of the MergeEvent object is set to False, InfoPath cancels the merge operation. If an error occurs in the code for the OnMergeRequest event handler, InfoPath ignores the error and relies on the ReturnStatus property of the MergeEvent object. If the ReturnStatus property is not explicitly set, the default value of False is used.
For InfoPath forms stored in a Windows SharePoint Services 3.0 form library, the OnMergeRequest event also occurs when the MergeDocuments2 method of the OpenXMLDocuments control is executed. For more information on the OpenXMLDocuments control, see the SharePoint Products and Technologies 2003 Software Development Kit, which is available on the Microsoft SharePoint Products and Technologies Web site.
If you create an event handler for the OnMergeRequest event of a form template, you must edit the form definition file (.xsf) to set the useScriptHandler attribute to "yes" before it will run.
In the following example, the OnMergeRequest event handler performs a merge operation, and it sets variables to indicate the status of the merge operation: