cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Nintex Javascript input value in repeating section

I have Single Line Textbox in a repeating section. This gets calculated through:

var calc1= NWF$('#' + vcalc1).val();
var RepSecCounter = NWF$('#' + repseccounter).val();
var tointRepSec = parseInt(RepSecCounter);
var tointRest = parseInt(calc1);

var calculation=(tointRest /tointRepSec);

else{
NWF$(".your-repeater .nf-repeater-row:not('.nf-repeater-row-hidden')").each(function ()
{
var $row = NWF$(this);
var $input1Val = $row.find(".input1 input").val(calculation);

});

This calculates the value correctally but when i put a calculated value beside it, it doesn't get the true value of it (shows "0"). Only if I keypress a spacebar and enter into the singleline textbox (manually), the calculated value gets the value.

I don't want to do it through a simulated keyevent in JS or Jquery trigger function.

Is there a way to truely calculate the value of the textbox right?

Is it because if this? 

var $input1Val = $row.find(".input1 input").val(calculation);

Labels: (3)
0 Kudos
Reply
1 Reply
Workflow Hero

Re: Nintex Javascript input value in repeating section

Because we can't see all of your code (there seems to be an else statement there... but no if, so I assume there is more), it's difficult to tell what's happening. However, if you're updating the value of your Single Line Text (SLT) Control using javascript, I recommend using something like: 

thisRow.find(".someSLTClass input").val(someNewVal).trigger("blur");

or even, if the above doesn't work: 

thisRow.find(".someSLTClass input").val(someNewVal).trigger("blur").trigger("change");

That should force the controls that have calculated formulas associated to that SLT value to update. 


0 Kudos
Accept as Solution Reply