Something like this:
NamesDefaultToHere(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Set up a selection of cells
dt << Select Rows( [5, 7, 8, 10] );
Column (dt, "name" ) << Set Selected ( 1 );
Column (dt, "sex" ) << Set Selected ( 1 );
// Function to set currently selected cells to '.' or ""
clearSelectedCells =
Function({dt}, {Default Local},
selCols = dt << getSelectedColumns;
selRows = dt << getSelectedRows;
for(c=1, c<=NItems(selCols), c++,
dType = Column(dt, selCols[c]) << getDataType;
if (dType == "Numeric",
Column(dt, selCols[c])[selRows] = .
,
Column(dt, selCols[c])[selRows] = ""
);
);
);
// Use the function
clearSelectedCells(dt);