I'm having trouble getting this logic correct and I'm not sure where I'm going wrong. I want to have a script where, if the operator name is row i is the same as the operator name in row (i-1), then if the measurement value in row i is missing, fill it in with the measurement value in row (i-1). I have several measurement values, so I'm searching across columns for any column with "Meas" in the name.
So far, I have the script below, but it just isn't working and I'm not sure why..
(also, I'm new to the forum. How do I get the code to maintain the formatting when I copy it in?)
dt = current data table();
for (j=1, j<= ncols(dt),j++,
colname = Column ( j ) << getname();
If( Contains( colname, "Meas") > 0,
for (i = 2, i <= nrows(dt), i++,
if(Column("OperatorName") == Column("OperatorName")[i-1],
if (column(j) == isMissing(),
column(j) = column(j)[i-1]; // set equal to row above