Changing table values in a for Loop
Hello,
I am basically as SAP Technical consultant and working on Adobe Forms, I am struggling a bit with the syntax as couple of the JAVA script statements don't seem to work. Could any one please help/guide me as to how can I change the values at run time in the loop? Based on the user input I have to re sequence a certain field of the table, I am assiging the value but it doesn't work.
var re_seq_flag = " "; // Re-Sequence Flag for (var nItemCount = 0; nItemCount < nItemsLength; nItemCount++) { // Begin Loop T_ELEMENTS after the Instance is created var old_row_id = sub_T_ELEMENTS.ROW_IID.rawValue; var new_row_id = oItems.nodes.item(nItemCount).ROW_IID.value; if ( oItems.nodes.item(nItemCount).ROW_IID.value == null) { re_seq_flag = "X"; new_row_id = parseFloat(sub_T_ELEMENTS.ROW_IID.rawValue) + parseFloat(1); oItems.nodes.item(nItemCount).ROW_IID.value = new_row_id; // This statement does not work xfa.host.messageBox("New Row added " else { if ( re_seq_flag == "X") { temp_index = parseFloat(oItems.nodes.item(nItemCount).ROW_IID.value) + parseFloat(1); oItems.nodes.item(nItemCount).ROW_IID.value = temp_index; // This statement does not work // xfa.host.messageBox("After Re-Seq " + oItems.nodes.item(nItemCount).ROW_IID.value); } } } In the above code where in I am trying to assign the value back to table field fails, am I using the correct syntax? Could anyone help me please? }
+ oItems.nodes.item(nItemCount).ROW_IID.value); }
else {
if ( re_seq_flag == "X") {
temp_index
= parseFloat(oItems.nodes.item(nItemCount).ROW_IID.value) + parseFloat(1); oItems.nodes.item(nItemCount).ROW_IID.value
= temp_index; // This statement does not work
// xfa.host.messageBox("After Re-Seq " + oItems.nodes.item(nItemCount).ROW_IID.value);
}
}
}
In the above code where in I am trying to assign the value back to table field fails, am I using the correct syntax? Could anyone help me please?