Multiplication errors in repeating tables (point and comma convers

E

elcia

I experience errors when multiplying double values in repeating table rows.
It seems, that for decimal (currency) values, calculations use "." separator
and return values with "."

I use "," decimal separator in my regional settings (Eastern Europe). Thus
if I multiply 1*1*1 (1,0 * 1,0 * 1,0) i get 1.000 (=1000) instead of one (!).

The same calculation conducted in expression control, outside of the
repeating table returns 1, as it should.

Is there any solution or "get around" for this error (dividing by 1000 does
not work, since any two decimal digit number would cause a need for increase
in the dividing factor)....

--
thanks for any help!

elcia,

MCTS: SQL2005, XML
MCP
 
S

S.Y.M. Wong-A-Ton

I cannot reproduce your issue; it works fine on my end. Which version of
InfoPath are you using? Do you have the latest service packs installed?

If you are writing code to do the calculations, you must make sure that your
are using decimal points instead of commas. If you are using rules to do the
calculations, InfoPath should recognize your regional settings automatically
to perform the calculations.

As a side note: Calculations are not a strong point of InfoPath and it has
been known to produce inaccurate results, especially when dealing with
calculations containing decimal separators.
 
A

A 1 coding

S.Y.M

Interesting Post, especially the bit about errors.

I have a form that is linked to an Access database. It's a basic PO. So I do
Qty * Unit price calculations. and then add tax. Sometimes it works and
sometimes I get an overflow error example 2,345.69 *6 errors. The 2,345.69 *
1 works fine.

Any idea how I can get past this because Infopath won't allow the database
to be updated (blocks the submit) when there are errors on the form.

Thanks
 
S

S.Y.M. Wong-A-Ton

It sounds like the size of the field is too small for the result of the
calculation. What is the data type of the field you are trying to update? And
if you try entering the result of the calculation directly into the database
table, do you get an overflow error too?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top