Calculated Value shows 0 on Edit


Badge +8

I have a repeater with multiple values that get added together outside the repeater in a calculated value control. This works fine. 

When editing an item that was already created, the calculated value shows zero. In order to show the correct value, I have to force it to recalculate by changing a number or adding an additional row to the repeater(which adds zero the current total).

How can I get around this? If I set the "calculate on edit" to no, it just doesn't update at all. If I set it to yes, it starts off at 0 and I have to force it to calculate by making a change.


16 replies

Userlevel 5
Badge +14

Can you please share the formula for your Calculated Control, and some configuration information about the controls it is targeting. 

Are the controls inside of the Repeating Section that it is going to target to add together Single Line Text controls formatted to Numeric Values? 


Badge +8

Sure!

 So the formula for the CV control is simply: sum(cvItemTotal) 

The name of the CV it's getting the sum of is, of course, cvItemTotal.

cvItemTotal is just a multiplication of two single line text boxes, txtPriceEach and txtQty.

It works fine when submitting a New item. The only problem is when you open an existing item to edit it, the CV shows 0 and you have to force it to recalculate by changing a value in the repeater.

Also, I just realized I have a completely different list/form doing the same thing. 0's when you load the edit form page.

Badge +8

Just a thought, but does your calculated column have a default value?

Badge +8

It does not.

Badge +8

Does nobody else have this issue? It seems like a pretty straightforward thing, I'm not sure how I have an issue with the edit page showing 0 and nobody else has. There's not many spots for me to go wrong here lol.

Userlevel 5
Badge +14

can you replicate the issue on a test form, or export and upload your Form's XML here so that we can replicate it in our environments? 

Badge +8

Yea, absolutely. I have it happening in two different forms on different sites and lists. I'll do an additional test today. Where should I upload the the form to so you guys can access it?

Userlevel 5
Badge +14

do you use a javascript to set control values that might directly or indirectly influence formula calculation?

have you checked developer console for errors reported?

is this problem related to the one you have risen in the past here -  

Badge +8

Use the advanced editor when replying. There is an attach feature at the bottom of the post.

211265_pastedImage_1.png

Badge +8

Here's the form

Badge +8

On one of them I do use JS to update some other fields. With the JS removed, it still has the same issue. On the other list, no JS, and it still does this. 

Not the same issue as that one that you so kindly helped me figure out happy.png. Different form/list/site and different functions. 

Userlevel 5
Badge +14

I loaded this up quickly, and everything worked absolutely fine for me in every form mode. 

I am curious to know if maybe this isn't an error of the version of Forms you are using. 

Perhaps updating might fix it? 

Shucks :-/ 


Badge +8

So you were able to create an item with a couple entries in the repeater, then save it. And when you loaded it in EDIT mode, it showed the correct total and not a zero?

In edit mode specifically, this is what happens for me:

Then I change a number and it works again:

Userlevel 5
Badge +14

Yeah. It just totally worked as expected. 

Didn't change a single thing (other than not having anything hooked up to a SharePoint column because I just imported it right into a test list with only a Title Field). 

Looking at the patch notes ( ) and searching 'Calculated', the very topmost entry for Product version: 2.11.1.0 Release date: 22nd November 2017, is

Fixed an issue where the Calculated Value control Sum function may not calculate correctly (00187034, 188130, 00189661)

!!! Might be worth looking into! 

I'm using one version behind for the 2016 On Premise, and would have that fix installed already

Badge +8

Yea, it looks like this will be what we need to do. Thanks a bunch for testing that out for me!

Badge +4

Hi @nj Did your issue got fixed ? I am facing sme issue and my Nintex buikd is also 3.3.1.0

Reply