cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Nintex Form Calculated Field Issue

Hi Everyone,

 

A really strange one for today.

 

I have a form, that uses tabs to show/hide fields, and a single set of Save and close buttons.

 

I have a repeting section on tab2, that contains 6 fields (field1 field2 field3 etc), and corresponding calculation fields on tab 1 with the calculation: Sum(field1) Sum(field2) etc

 

If I save the form while tab2 is selected the calculated fields show the corect information, however if I save the form on any other tab the values are wiped out and replaced with '0'

 

really, really frustrating and a bit odd as well.  As the repeting section is only hidden when on a different tab, so is still present in the form.

 

Anyone have any ideas why this is happening and how to resolve it?

 

Michael

Labels: (1)
0 Kudos
Reply
12 Replies
Highlighted
Not applicable

Re: Nintex Form Calculated Field Issue

I have more detailed information on this issue, All pictures are in the attached word doc.

As you can see in (Pic1) I have 6 calculated fields at the bottom all set to '0', on Tab 1 (Overview).

On tab2 (impact allocation) pic2, the calculated fields get their data from the repeating section at the bottom of the page.

The calculation is displayed in pic7. sum(field1) for example.

I fill out the repeating section on tab2 (pic3), and the calculation is displayed correctly in tab1 (pic4).

However if I go into another tab and make an edit and save on that tab (pic5) all the calculated fields are then set to '0' (pic6) and the information stored is wiped out.

To make it more complicated, if I remove the rule on the repeating section on tab2 (pic8) and make tab2 information visible on all tabs the issue is resolved.

Any assistance would be greatly received.

0 Kudos
Reply
Highlighted
Not applicable

Re: Nintex Form Calculated Field Issue

Hi Michael,


Do you mind to share the form XML file for me to have a look on it? Remember to remove sensitive content.

0 Kudos
Reply
Highlighted
Not applicable

Re: Nintex Form Calculated Field Issue

Hi Stephen,

Please see attached

Michael

0 Kudos
Reply
Highlighted
Not applicable

Re: Nintex Form Calculated Field Issue

It looks like a bug. To workaround the issue at the moment, try the following steps:

1. For the Impact Allocation panel, give it a CSS  Class called ImpactAllocationPanel.

2. For the repeater inside the Impact Allocation panel, give it a CSS Class called ImpactCalculationRepeater.

3. On Settings -> Custom JavaScript, key in the below codes:

NWF.FormFiller.Events.RegisterAfterReady(function () {

    NWF$('.nf-filler-control.ImpactAllocationPanel').show();

    NWF$('.ImpactCalculationRepeater').find('.nf-repeater-row:nth-child(2)').find('.nf-hidden-associated-control').each(function () {

        NWF.FormFiller.Functions.ProcessOnChange(NWF$(this));

    });

    NWF$('.nf-filler-control.ImpactAllocationPanel').hide();

});

What it does is on the form ready, it will temporary show the Impact Allocation panel, and quickly go through the repeater and trigger the change to recalculate the sum, and then hide the panel again.


Couple of notes, the line 3 might need to tweak if it not working for you, because currently it only process first row of the repeater, if we go through whole repeater, it might too slow. I have only tested on Chrome and IE11, not sure if it works on your browser, and I haven't tested the scenario where you saved the form with the Imptact Allocation panel selected.

Hope it help.

0 Kudos
Reply
Highlighted
Not applicable

Re: Nintex Form Calculated Field Issue

Brilliant Stephen, I will give it a go and let you know the outcome

0 Kudos
Reply
Highlighted
Not applicable

Re: Nintex Form Calculated Field Issue

Hi Stephen,

I gave your code a go and it seems to work pretty well, except on save the SHarePoint list firlds arenot being updated with the new calculated value.

I will try figure out why this is misbehaving and hopefully will get this sorted soon.

Thanks for helping, its much appreciated.

Michael

0 Kudos
Reply
Highlighted
Not applicable

Re: Nintex Form Calculated Field Issue

How is it going for you?

I've tried with your form on my environment, I can connect the calculated value to the column and get the updated once I change the value in the repeating section.

0 Kudos
Reply
Highlighted
Not applicable

Re: Nintex Form Calculated Field Issue

Hi Stephen,

 

Thanks for all your help thus far its very much appreciated.

 

I have found a solid workaround while nintex support tlook at what is obviously a software bug.

 

I created a workflow that queries the exported XML in a list column, and iterates through the respective XPaths and updates a list field which the form uses to display the correct information.

 

I have attached the workflow for anyone who may be interested.

 

Michael

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Nintex Form Calculated Field Issue

What about some javascript to reset the tabs to the tab with the repeating section before save/submit/close?

something like:

NWF.FormFiller.Events.RegisterAfterReady(function(){NWF$(':radio[value="Tab with Repeating Section"]').click();]);

added to the Client Click field on the Save button worked for me

0 Kudos
Reply