Here is a modification to my initial script to do what I think you want.....
Names Default To Here( 1 );
// Create a sample data table
dt = New Table( "Example 2",
Add Rows( 6 ),
New Column( "Censor A",
Character,
"Nominal",
Set Values( {"F", "F", "F", "", "", "F"} )
),
New Column( "Censor B",
Character,
"Nominal",
Set Values( {"", "F", "", "", "F", ""} )
),
New Column( "Censor C",
Character,
"Nominal",
Set Values( {"F", "", "", "F", "F", ""} )
),
New Column( "Setting Column",
Character,
"Nominal",
Set Values( {"Z", "X", "Y", "W", "P", "Q"} )
)
);
// Get the names of all of the columns
colNames = dt << get column names( string );
// Loop across all columns and if a Censor column
// then process
For( i = 1, i <= N Items( colNames ), i++,
If( Left( colNames[i], 6 ) == "Censor",
dt << select where( As Column( colNames[i] ) == "" );
// If blanks are found then process
rowMat = dt << get selected rows;
If( N Rows( rowMat ) > 0,
For( k = 1, k <= N Rows( rowMat ), k++,
Column( colNames[i] )[rowMat[k]] = :Setting Column[rowMat[k]]
)
);
)
);
Jim