Here is a complete example of changing single values in a String Col Box() and in a Number Col Box()
Names Default To Here( 1 );
dtData = Open( "$SAMPLE_DATA/big class.jmp", private );
dt = New Table( "hidden", private, New Column( "theRow", set values( Index( 1, N Rows( dtData ) ) ) ) );
dt << update( with( dtData ) );
Close( dtData, nosave );
numberList = As List( Column( dt, 1 ) << get values );
For Each( {value, i}, numberList, numberList[i] = Char( value ) );
nw = New Window( "Example",
H List Box(
myTable = Table Box(
c0 = Number Col Box( "", Column( dt, 1 ) << get values ),
c1 = String Col Box( Column( dt, 2 ) << get name, Column( dt, 2 ) << get values ),
c2 = Number Col Box( Column( dt, 3 ) << get name, Column( dt, 3 ) << get values ),
c3 = String Col Box( Column( dt, 4 ) << get name, Column( dt, 4 ) << get values ),
c4 = Number Col Box( Column( dt, 5 ) << get name, Column( dt, 5 ) << get values ),
c5 = Number Col Box( Column( dt, 6 ) << get name, Column( dt, 6 ) << get values )
),
Panel Box( "Change Values",
H List Box(
cb1 = Combo Box( {"Name", "Age", "Sex", "Height", "Weight"} ),
cb2 = Combo Box( numberList ),
teb = Text Edit Box( "", <<set width( 80 ) ),
changeBox = Button Box( "Change Value",
theColumn = cb1 << get text;
theRow = Num( cb2 << get text );
If( Contains( {"Name", "Sex"}, theColumn ),
theValue = teb << get text,
theValue = Num( teb << get text )
);
Column( dt, theColumn )[theRow] = theValue;
newValues = dt[theRow, 0];
myTable << delete row( theRow );
Eval(
Parse(
"myTable << insert row(" || Char( theRow ) || ", " || Char( newValues ) || ");"
)
);
)
)
)
)
);
nw << on close( Close( dt, nosave ) );
Jim