
How can I add unit in column property based on contain of file name. In this case if it has _Voltgae at the end I want V as unit. and if _Current at the end add A as unit.
Here is a simple example:
Names Default To Here( 1 );
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
colNames = dt << get column names( continuous, string );
For Each( {col}, colNames,
If(
Contains( col, "hei" ),
Column( col ) << set property( units, "inches" ),
Contains( col, "wei" ),
Column( col ) << set property( units, "lbs" )
)
)
;
