Expression box gives incorrect results for mathematical expressions in InfoPath 2003 or in InfoPath 2007

With a Microsoft Office InfoPath form template, if you add an expression box that evaluates a mathematical expression that involves decimal numbers, you may receive incorrect results.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Problem

1. In InfoPath, design a new, blank form.
2. In the Design Tasks pane, click Layout to open the Layout task pane.
3. In the Layout task pane, click Table with Title.
4. In the table, click the text Click to add a title, and then type Accounting Example.
5. Right-click the text Click to add form content, and then click Split Cells.
6. In the Split Cells dialog box, set Number of columns to 3, set Number of rows to 3, and then click OK.
7. Add data to the cells as follows:

a. Add the following text to the table:

Month Credits Debits
February    
March    
b. In the task pane, click Controls to open the Controls task pane.
c. Click inside the cell on the second row and the second column, and then click Text Box in the task pane to add a text box.
d. Right-click the text box, and then click Text Box Properties.
e. In the Text Box Properties dialog box, set Data type to Decimal (double), set Default value to 1.225, and then click OK.
f. Repeat steps c through e for the cell in the second row and the third column, but set Default value to 1.225.
g. Repeat steps c through e for the cell in the third row and the second column, but set Default value to1.333.
h. Repeat steps c through e for the cell in the third row and the third column, but set Default value to 1.333.
8. Click outside the table, and then press the ENTER key. Type the following:Does account reconcile?
9. Switch to the Controls task pane, and then click Expression Box.
10. In the Insert Expression Box dialog box, set XPath to the following, and then click OK:(my:field1)+(my:field3)-(my:field2)-(my:field4)=0

Notice that the value of the expression box is set to false after you follow these steps.


APPLIES TO
Microsoft Office InfoPath 2007
Microsoft Office InfoPath 2003
Microsoft XML Core Services 4.0

——————————————–

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

 


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image