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
WebDesignesCrow
Super User

Replace value of specific row in Table B with value from specific column in Table A

Hello Experts,

 

I'm trying to automate updating my "GetLimitTable" with new data (I'm using Levey Jennings).

How to replace value of specific row in Table B with value from specific column in Table A?

For example, I want to;

-  replace row _Std Dev Value from 18.769 (Table B) with 10.312 (Robust Standard Deviation Table A)

-  replace row _Mean Value from 166.526 (Table B) with 166.1056 (Robust Mean Table A)

- replace row _LCL Value from 110.219 (Table B) with 135.145 (3*RobustStdDev Below Mean Table A)

- replace row _UCL Value from 222.833 (Table B) with 197.0656 (3*RobustStdDev Above Mean Table A)

WebDesignesCrow_1-1677209908815.png

Thank you in advance

(I'm using JMP 17)

 

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Replace value of specific row in Table B with value from specific column in Table A

Assuming the row you want to get the data from in Table A is row 1, the following script will show you how to read from Table A and write to Table B

Names Default To Here( 1 );
dtA = Data Table( "Table A" );
dtB = Data Table( "Table B" );

dtB:Value[(dtB << get rows where( dtB:_LimitsKey == "_Std Dev" ))[1]] = 
	dtA:Robust Standard Deviation[1];

// Repeat for each of the values you need to transfer
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Replace value of specific row in Table B with value from specific column in Table A

Assuming the row you want to get the data from in Table A is row 1, the following script will show you how to read from Table A and write to Table B

Names Default To Here( 1 );
dtA = Data Table( "Table A" );
dtB = Data Table( "Table B" );

dtB:Value[(dtB << get rows where( dtB:_LimitsKey == "_Std Dev" ))[1]] = 
	dtA:Robust Standard Deviation[1];

// Repeat for each of the values you need to transfer
Jim
WebDesignesCrow
Super User

Re: Replace value of specific row in Table B with value from specific column in Table A

Awesome Jim!

It works. Thanks