Hi Jim @txnelson ,
Quick question:
I modified the jsl script and want to filter rows based on the check box selection.
The below script will create a new window, ask user to select the check box for site number.
I want to only add mean offset to the SiteNumber selection.
If SiteNumber 1 is selected, align only those rows . I have attached both files
I tried using get rows where but the results doesn't seem to be accurate. Looking for some suggestions
Names Default To Here( 1 );
Clear globals();
Clear log();
dt1 = Data table( "Reference data table" );
dt2 = Current data table(); /// Select Data table.jmp
For(i=1,i<=nrows(dt1),i++,
theTest = dt1:Tests[i];
try(column(dt2,theTest) << set property("TheMean", dt1:Mean[i]));
);
New window( "", modal,
ct = checkbox({"1","2"}),
Buttonbox ("Ok",
ft = ct << Get Selected Indices();
), ct << set all(1);
);
sitenum = {2};
//Insert Into (sitenum, ft);
Col_List1 = dt2 << Get Column Names( "String" );
//if (!contains(Col_List1, "SiteNumber"),
// dt2 <<New Column("SiteNumber", "Numeric", "Continuous", <<Set Each Value( 1 ) );
// );
For( c = 1, c <= N Col( dt2 ) -1, c++,
theMatrix = [];
name = Column( Col_List1[c] ) << Get name;
if (Contains( Col_List1[c], "Current 1.1") | Contains( Col_List1[c], "Voltage 1.7"),
//For( r = 1, r <= N Rows( dt2 ), r++,
//For Each Row( r=row();
r = dt2 << get rows where(contains(sitenum, dt2:SiteNumber)); ///** get rows based upon the check box input
//mean = dt1:Mean[dt1 << Get Rows Where( :Tests == name )];
mean = column(dt2, Col_list1[c]) << get property("theMean");
//measure = mean - Col Mean( If( dt2:Strips == dt2:Strips[r], Column( dt2, c ), . ) );
measure = mean - Col Mean(as Column( dt2, c ),:Wafer ID);
theMatrix = theMatrix || Column( dt2, c )[r] + measure;
Column( dt2, c ) << Set Values( theMatrix );
););