BUG: The results of the calculations in an InfoPath form are incorrect in InfoPath 2003 (891162)
The information in this article applies to:
- Microsoft Office InfoPath 2003, Service Pack 1 (SP1)
SYMPTOMSIn Microsoft Office InfoPath 2003, when you use an InfoPath form that contains calculations, values from the OriginalData nodes may be included with values from the selected nodes that are used in the calculations. This behavior is unexpected.
Therefore, the results of the calculations in the InfoPath form are incorrect.CAUSEThis problem occurs when the calculations in the InfoPath form contain an XPath expression that starts with two slash marks (//). The OriginalData nodes are in the same namespace as the nodes in the DataSet object. For example, the following calculation returns the correct results. xdMath:Avg(//dfs:dataFields/tns:UntypedDataSetQueryResponse/tns:UntypedDataSetQueryResult/ns1:NewDataSet/ns1:untypedDataSetTable/ns1:id)
However, if the XPath expression is truncated like the following example, this problem occurs. xdMath:Avg(//ns1:NewDataSet/ns1:untypedDataSetTable/ns1:id)
WORKAROUNDTo work around this problem, use one of the following methods: - Use the selectSingleNode method, and specify the exact XPath expression that you want to use.
- If you have to use the selectNodes method to create a multiple-selection XPath expression, select all nodes that you want to use under the first DataSet construct. For example, if you have a DataSet object that is named DataSet, use an XPath expression that follows the following format:
full_xpath_to_DataSet[position()=0]//xpath_to_nodes_for_selection
STATUS Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 4/5/2005 |
---|
Keywords: | kbXML kbtshoot kbbug KB891162 kbAudDeveloper |
---|
|