Skip to main content
Nintex Community Menu Bar

Repeating section duplicate row

  • Jun 6, 2017 10:17 AM UTC
  • 29 replies
  • 92 views
  • Translate All

Show first post

29 replies

Forum|alt.badge.img+3
  • Author
  • Oct 26, 2017 8:46 AM UTC

Strange - if I used this .val in RegisterRepeaterRowAdding -  i'm getting the last entered value.

But if I used .val in RegisterRepeaterRowAdded  - i'm getting an empty value..

Translate

Forum|alt.badge.img+9
  • Nintex Partner
  • Oct 26, 2017 8:54 AM UTC

Actually that's not strange : when you add a new row in a repeating section, it adds a row at the end of the repeating section and this new row is empty. The javascript line of code is getting the value of the textbox which is in last line of the repeating section. So once the new line is added, the last line is empty...

You should use RegisterRepeaterRowAdded and the following lines of code :

var secondToLastLine = NWF$('.RP .nf-repeater-row:not(.nf-repeater-row-hidden):last").prev();

NWF$('.RP .nf-repeater-row:not(.nf-repeater-row-hidden):last input.prim').val(secondToLastLine.find('input.prim').val());

Translate

Forum|alt.badge.img+3
  • Author
  • Oct 26, 2017 8:59 AM UTC

Ching Ching, we have a winner!
Thank you, ‌!

Big thanks to You, ‌! 

Huge respect!

Translate

Forum|alt.badge.img+9
  • Nintex Partner
  • Oct 26, 2017 10:15 AM UTC

I'm glad that you finally found a solution happy.png.

Please mark an answer as correct to let people know that this question has been resolved wink.png

Translate