I want to keep "Model" & "ModelNumber" columns in a global table, but the logic OnReset delete all the rows that I dont want to delete, how can I keep these columns without erasing the "Delete All Rows" on the global table
Table current = param(1); //Data nodeTable current = param(1); //Data node { // ************* PickOption Start ************* // /**Delete All Rows*/ /**\nDeletes all rows of the table, preserving the column headers*/ current.setSize(1, current.numCols); } // ******* PickOption End ******* // Table Boom_Sequence = Table("BoomSequence_3"); for(int h = 1 ; h<= Boom_Sequence.numRows ; h++) { if(Boom_Sequence[h]["Model"] == "Gavea30") { Boom_Sequence[h]["ModelNumber"] = 1; } else if(Boom_Sequence[h]["Model"] == "Gavea36") { Boom_Sequence[h]["ModelNumber"] = 2; } else if(Boom_Sequence[h]["Model"] == "PLA40") { Boom_Sequence[h]["ModelNumber"] = 3; } else if(Boom_Sequence[h]["Model"] == "PLAHibrido") { Boom_Sequence[h]["ModelNumber"] = 4; } else if(Boom_Sequence[h]["Model"] == "PLA36") { Boom_Sequence[h]["ModelNumber"] = 5; } } int Dr = Boom_Sequence[1][3]; int RS = Boom_Sequence[1][4]; Array x = Array(Dr); Array y = Array(Dr).fill(0); for(int i = 1; i <= Dr; i++){ x[i] = i; } for(int j = 1; j <= Dr; j++){ Variant z = duniform(1,x.length,RS); y[j] = x[z]; x.splice(z,1); } for(int k = 1; k <= y.length; k++){ Boom_Sequence.addRow(k + 1, 0); Boom_Sequence.setRowHeader(k + 1, "" + numtostring(k)); Boom_Sequence[k + 1][3] = y[k]; }