cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Due to the recently reported Microsoft outage, users may be temporarily unable to access My JMP or experience a delay receiving their verification codes. If you have previously installed JMP on your computer, this outage should not impact your ability to access the software. My JMP services will be restored as soon as Microsoft resolves this issue.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
RK1
RK1
Level II

Get column Property and store as list

I have a large data set and each column has spec limit  i am looping through the column names and trying to get spec Limit and storing them as a list. But somehow script is not storing the values of spec Limits in a list and giving only values for last iteration. 

any help on how to store spec values as list ? 

 

data_cols = dt1 << Get Column Names (continuous);

lsl= {};

usl={};

for (m =1,m<=NItems(data_cols),m++,

specs = Column(dt1,char(data_cols[m])) << get property ("Spec Limits");

lsl= specs["LSL"];
usl = specs ["USL"];

);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Get column Property and store as list

Your code just kept replacing the complete value of the lists, LSL and USL;  See below for solution

dt1 = Current Data Table();

data_cols = dt1 << Get Column Names( continuous );

lsl = {};

usl = {};

For( m = 1, m <= N Items( data_cols ), m++, 

	specs = Column( dt1, Char( data_cols[m] ) ) << get property( "Spec Limits" );

	lsl[m] = specs["LSL"];
	usl[m] = specs["USL"];

);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Get column Property and store as list

Your code just kept replacing the complete value of the lists, LSL and USL;  See below for solution

dt1 = Current Data Table();

data_cols = dt1 << Get Column Names( continuous );

lsl = {};

usl = {};

For( m = 1, m <= N Items( data_cols ), m++, 

	specs = Column( dt1, Char( data_cols[m] ) ) << get property( "Spec Limits" );

	lsl[m] = specs["LSL"];
	usl[m] = specs["USL"];

);
Jim
RK1
RK1
Level II

Re: Get column Property and store as list

It worked, Thanks for quick Reply.

Recommended Articles