What is the best way to update the New Table Variable value inside a function. At this moment, I am doing it as below. However, I found that this Days variable will not get updated and it will create a new variable called Days 2.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Table Variable( "Days", 42 ); // In original data table, Days set to default which is 42
// assume below is a new function, and I'm passing dt as input and I want to update the Days variable
myFunction = Function ({dt},
// I want this Days variable get updated with new value below, 100
dt << New Table Variable ( "Days", 100);
dt << Select Where( :Name( "sex" ) == "F" );
dt << Subset( Copy formula( 1 ), Suppress formula evaluation( 0 ), Selected Rows( 1 ), Selected columns only( 0 ) );
dt = Data Table (Current Data Table() << Get Name());
);
myFunction(dt)