Share via


IPMath.Nz Method

Gets the node set passed to the function, except with zeros (0) where empty values existed before.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
Function Nz ( _
    pxmllistInput As IXMLDOMNodeList _
) As Object
'Usage
Dim instance As IPMath
Dim pxmllistInput As IXMLDOMNodeList
Dim returnValue As Object

returnValue = instance.Nz(pxmllistInput)
Object Nz(
    IXMLDOMNodeList pxmllistInput
)

Parameters

Return Value

Type: System.Object
An object that represents a node set.

Remarks

An exception occurs if there are no empty values in the node set.

Note

Accessing the object returned by the Nz method by casting it to the IXMLDOMNodeList type in a managed form may result in security exceptions, in which case the form should be given FullTrust permissions.

Important

This member can be accessed without restrictions.

Examples

In the following example, the variable noZero is set to a node set that is identical to the my:ages node set, with all blank values replaced by zeros. This example is based on a repeating section with a field named "ages." An alert is shown for the XML generated for the first entry in the node list:

IXMLDOMNodeList ages = thisXDocument.DOM.selectNodes("//my:ages");
IXMLDOMNodeList noZero = (IXMLDOMNodeList)thisXDocument.Util.Math.Nz(ages);
thisXDocument.UI.Alert(noZero[0].xml.ToString());

See Also

Reference

IPMath Interface

IPMath Members

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace