Skip to main content
Nintex Community Menu Bar

I dynamically populate repeating section fields they became labels and are not saved in list. How to save them?

  • March 21, 2017
  • 9 replies
  • 33 views

9 replies

Forum|alt.badge.img+1

Let me know what is your mode while loading the repeating section, Edit or New and also if you have any rule to disable the controls remove it and try, make sure to connect this repeating section to a Multline text in sharepoint list


Forum|alt.badge.img+2

I tried both modes: New and Edit. I do not have any rules. Yes, it is connected to the Multiline. I populated these fields using script. All those fields are from calculated value fields.


Forum|alt.badge.img+9
  • March 22, 2017

Have You tried to trigger a change event for the fields:

NWF.FormFiller.Functions.ProcessOnChange(ctrl_id);


Forum|alt.badge.img+2

Manfred, it does not work. I execute addRowToMySection function on click.

function addRowToMySection() 
  {
   var rs = null;
  NWF$(document).ready(function() {
  rs = NWF$(".MOsRep .nf-repeater-row:last"); 
   var lookUpTaxId = NWF$("#" + CalcTaxId);
  var lookUpTaxIdVal = lookUpTaxId.val();
  var taxId = NWF$(rs).find(" .repMosTaxId");

var fName = NWF$(rs).find(".repMosFirst ");
  var lName = NWF$(rs).find(".repMosLast");
  var rank = NWF$(rs).find(".repMosRank");
  var cmdCode =  NWF$(rs).find(".repMosCmdCode");
  var cmdName = NWF$(rs).find(".repMosCmdName");
  var calcFName= NWF$("#" + Calc_fnm);

 var fVal = calcFName.val();
  var sqlLName= NWF$("#" + Calc_lnm);
  var lVal = sqlLName.val();
  var sqlRank= NWF$("#" + Calc_rank);
  var rankVal = sqlRank.val();
  var sqlCmdCode= NWF$("#" + Calc_cmdCode);
  var CmdCodelVal = sqlCmdCode.val();

var sqlCmdName = NWF$("#" + Calc_cmdName);
  var cmdNameVal = sqlCmdName.val();
  if (lookUpTaxIdVal == "")
{
 alert ( lookUpTaxIdVal + " is not found");
}
else

{

NWF$ (taxId.text(lookUpTaxIdVal) );
 NWF$(fName.text(fVal));
  NWF$(lName.text(lVal));
  NWF$(rank.text( rankVal));
  NWF$(cmdCode.text(CmdCodelVal));
  NWF$(cmdName.text(cmdNameVal));
   NWF.FormFiller.Functions.ProcessOnChange(cmdName);
 }

});
  NWF$(".MOsRep").find('a').click(); 
}

 


Forum|alt.badge.img+14
  • Scholar
  • March 22, 2017

all those line like

 NWF$(fName.text(fVal));

are incorrect and cause to turn controls into 'label'

examine DOM, you are trying to  populate value at wrong level.


Forum|alt.badge.img+2

Marian, where should I populate it?


Forum|alt.badge.img+2

Marian, where should I populate it?


Forum|alt.badge.img+14
  • Scholar
  • March 22, 2017

hard to guess how you have structured your form and what elements you address with lot of different classes within your code,  just off top of head I think something like this might work (or at least point you to working direction)

fName.find('.nf-associated-control').val(fVal);

Forum|alt.badge.img+2

Yes, Marian, it is right. Thank you very much.