Hi! all,
I would like to find and replace data which contain certain value range in specific column by using jmp script
However, the code didn't take effect
Here is my code that want to loop through the data in "mark" column and look for value that more than 1000 and substitute with 99
Names Default To Here( 1 );
dt = Data Table( "studentmark" );
headerList = dt << get column names( string );
For( i = 1, i <= N Items( headerList ), i++,
If( Contains(headerList[i], "mark"),
dt << Begin Data Update;
For Each Row( dt, As Column( dt, headerList[i]) = Substitute( As Column( dt, headerList[i]) > 1000 , 99 ));
dt << End Data Update;
);
);
Does anyone knows what's went wrong with the code?
Appreciate the helps. Thank you