cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
lehaofeng
Level V

Why does the order of the values in matrix scb4 change when added to a tablebox?

Why does the order of the values in matrix scb4 change when added to a tablebox? How does it not change? And a second question, can the order in tablebox be set according to two columns, now it is provided as one column. Thanks!

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
ps = dt << Process Screening(
	Grouping( :Site ),
	Process Variables( Eval( 5 :: 132 ) )
);

tb = report(ps)[Table Box( 1 )];
delta = Matrix( Report( ps )[Number Col Box( "Mean" )] << get ) - (Matrix( Report( ps )[Number Col Box( "USL" )] << get )
+Matrix( Report( ps )[Number Col Box( "LSL" )] << get )) / 2;



scb4 = Number Col Edit Box( "distance", delta );
//
a=scb4<<get;
tb << append( scb4 );
b=scb4<<get;
c=a-b;
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Why does the order of the values in matrix scb4 change when added to a tablebox?

My guess is that because you are appending it to a platform it will for some reason use default ordering. There might be a lot going on what you cannot see when you are directly manipulating JMP platforms like that. You could maybe use Clone Box to get the table and append to that (depending on what you are doing).

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
ps = dt << Process Screening(Grouping(:Site), Process Variables(Eval(5 :: 132)));

tb = Report(ps)[Table Box(1)];
delta = Matrix(Report(ps)[Number Col Box("Mean")] << get) - (Matrix(Report(ps)[Number Col Box("USL")] << get)
 + Matrix(Report(ps)[Number Col Box("LSL")] << get)) / 2;


scb4 = Number Col Edit Box("distance", delta);
nw = new window("",
	tb1 = tb << Clone Box;
);
a = scb4 << get;
tb1 << append(scb4);
b = scb4 << get;
c2 = a - b;

scb4 = Number Col Edit Box("distance", delta);
a = scb4 << get;
tb << append(scb4);
b = scb4 << get;
c1 = a - b;

-Jarmo

View solution in original post

jthi
Super User

Re: Why does the order of the values in matrix scb4 change when added to a tablebox?

Maybe you could first append the Number Col Edit Box and then set the values to i

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
ps = dt << Process Screening(Grouping(:Site), Process Variables(Eval(5 :: 132)));
tb = (report(ps)[table box(1)]);


delta = Matrix(Report(ps)[Number Col Box("Mean")] << get) - (Matrix(Report(ps)[Number Col Box("USL")] << get)
 + Matrix(Report(ps)[Number Col Box("LSL")] << get)) / 2;


scb4 = Number Col Edit Box("distance", {});
tb << append(scb4);
scb4 << Set Values(delta);

wait(0);
tb << Sort By Column("Stability Index", 0);

I'm not sure how easily this would break when you are performing different actions within Process Capability though

-Jarmo

View solution in original post

4 REPLIES 4
jthi
Super User

Re: Why does the order of the values in matrix scb4 change when added to a tablebox?

My guess is that because you are appending it to a platform it will for some reason use default ordering. There might be a lot going on what you cannot see when you are directly manipulating JMP platforms like that. You could maybe use Clone Box to get the table and append to that (depending on what you are doing).

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
ps = dt << Process Screening(Grouping(:Site), Process Variables(Eval(5 :: 132)));

tb = Report(ps)[Table Box(1)];
delta = Matrix(Report(ps)[Number Col Box("Mean")] << get) - (Matrix(Report(ps)[Number Col Box("USL")] << get)
 + Matrix(Report(ps)[Number Col Box("LSL")] << get)) / 2;


scb4 = Number Col Edit Box("distance", delta);
nw = new window("",
	tb1 = tb << Clone Box;
);
a = scb4 << get;
tb1 << append(scb4);
b = scb4 << get;
c2 = a - b;

scb4 = Number Col Edit Box("distance", delta);
a = scb4 << get;
tb << append(scb4);
b = scb4 << get;
c1 = a - b;

-Jarmo
lehaofeng
Level V

Re: Why does the order of the values in matrix scb4 change when added to a tablebox?

Thank you very much! It's already solved most of the problems. I would very much like to be able to add it to the original platform so that the commands on the platform can be used as well. But anyway, this is already very good too!

jthi
Super User

Re: Why does the order of the values in matrix scb4 change when added to a tablebox?

Maybe you could first append the Number Col Edit Box and then set the values to i

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
ps = dt << Process Screening(Grouping(:Site), Process Variables(Eval(5 :: 132)));
tb = (report(ps)[table box(1)]);


delta = Matrix(Report(ps)[Number Col Box("Mean")] << get) - (Matrix(Report(ps)[Number Col Box("USL")] << get)
 + Matrix(Report(ps)[Number Col Box("LSL")] << get)) / 2;


scb4 = Number Col Edit Box("distance", {});
tb << append(scb4);
scb4 << Set Values(delta);

wait(0);
tb << Sort By Column("Stability Index", 0);

I'm not sure how easily this would break when you are performing different actions within Process Capability though

-Jarmo
lehaofeng
Level V

Re: Why does the order of the values in matrix scb4 change when added to a tablebox?

Thank you very much, very useful!