currency fields doesn't add cents


Badge +8

Hi everyone,

I have 10 fields that are currency fields; a user puts a value in  [12.52] and the total uses the sum function to add all the values.  Currently the value of the total is 10, not 12.52.  If any other values are add it adds all the whole numbers.

Thank you, as always any suggestions are appreciated!

Jennifer


12 replies

Badge +11

Hi Jennifer,

The currency column although should work in this case but it is a known fact that it doesn't. Instead you should use Number columns for this calculation and for showing on the form, you can use the $ symbol. You will get accurate results only with number column and set to 2 or 3 decimal places. Hope that helps.

Badge +8

Thanks Kapil for the reply. I changed the columns for a currency type to a number with 2 decimal places and it still doesn't add.

Thanks again,

Jennifer

Badge +11

The formula, change it to either: BD100+Bd50+Bd10.... or sum(Bd100, Bd50, Bd10...)

I've seen that it works by simply putting + in between, you dont need sum function.

Badge +8

Thanks for the reply.  Using just the [+] concatenates them and using sum(value, value, value) doesn't add them.  It seem like this should be pretty simple and I'm fairly sure I am not doing anything incorrect, it is pretty straight forward, but it doesn't seem to work.

Badge +11

example.jpg

As long as the field are of correct format, it should work. They are decimal or integer or if connected to list column, should be number.

Badge +8

Did you try not using whole numbers in your test?  It works fine with whole numbers it's when you put in something like 5.33 + 89.55 that is doesn't add correctly.  Also mine is in a repeating section; could that cause an issue?

thanks,

Jennifer

Userlevel 6
Badge +12

Jennifer Wiskemann​ -

TL:DR -

If you are using sum(X + Y + Z + n), just be sure to set the default value to 0.00. This circumvents issues since we are providing values rather than null. If you use X + Y + Z + n (not using sum()), you do not need to worry about setting a default value, but I would still recommend it.

I tested out adding currencies and everything worked as expected:174067_pastedImage_0.png

Now, I did do some more testing and found that if the calculated field is not set as currency, it provides interesting results. Below is what happens when it is set as a string or integer

174071_pastedImage_3.png

I also set my calculation to be sum(Test1+Test2) rather than Test1+Test2 and I see the same results:

174072_pastedImage_4.png

but when I add in the second value.....

174073_pastedImage_5.png

This got me to thinking that perhaps if you define a default value (such as 0), it would rectify the issue...

174074_pastedImage_6.png

Hope this helps!

Badge +8

Jesse, thank you for your reply.  I am not crazy; it doesn't seem to work in a repeating section. I tested it several times then remove the fields and put them on the form without being in a repeating section and it works fine. This seems like a bug so I am going to open a ticket with Nintex.

Thanks again,

Jennifer

Userlevel 6
Badge +12

I think that may be the culprit here, but I am not sure how you have your repeating section setup. Is it imperative that it is in a repeating section?

I tried it in a repeating section (with one control) and created a calculated value control that simply sum(Test1).

175002_pastedImage_0.png

Let me know what you discover as I am interested in what they have to say.

Badge +11

What if you add '.00' to fields with no cents?

Badge +8

It just ignore it.  It is definitely an issue with the repeating section. I put in a ticket with Nintex, still waiting to see what they say.

Badge +8

Hi Everyone!

After a little back and forth with support they were kind enough to point out that you need "[" and "]" in the formula.  So it needs to be sum([value1, value2, value3])

How do ya like that!

Thanks everyone for your input!

Jennifer

Reply