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)....

Signature
thanks for any help!
elcia,
MCTS: SQL2005, XML
MCP
S.Y.M. Wong-A-Ton - 11 Nov 2007 03:11 GMT
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.
---
S.Y.M. Wong-A-Ton
> I experience errors when multiplying double values in repeating table rows.
> It seems, that for decimal (currency) values, calculations use "." separator
[quoted text clipped - 9 lines]
> not work, since any two decimal digit number would cause a need for increase
> in the dividing factor)....
A "1" coding - 20 Nov 2007 18:10 GMT
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
> 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?
[quoted text clipped - 24 lines]
> > not work, since any two decimal digit number would cause a need for increase
> > in the dividing factor)....
S.Y.M. Wong-A-Ton - 21 Nov 2007 04:44 GMT
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?
---
S.Y.M. Wong-A-Ton
> S.Y.M
>
[quoted text clipped - 38 lines]
> > > not work, since any two decimal digit number would cause a need for increase
> > > in the dividing factor)....