<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Trying to extract spec limits from columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/708412#M89241</link>
    <description>&lt;P&gt;Related to this discussion - here's a neat little function I wrote to handle pulling specs. &amp;nbsp;It uses expression handling and an Associative Array to make a nice little dictionary that can be used later:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;getSpecs = Function( {colref},
	{default local}, 
	
	// get the spec limits column property
	plist = colref &amp;lt;&amp;lt; Get Property("Spec Limits");
	// some blank lists to hold the values
	keys = {};
	values = {};
	// loop through the property and get the sub-property name and value
	// put those into the correct lists
	For Each( {value, index}, plist,
		Insert Into( keys, Head Name( value ) );
		Insert Into( values, Arg( value, 1) );
	);
	// build an AA and return as the result of the function
	parameters = Associative Array( keys, values );		
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use would look something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

Clear Log();

getSpecs = Function( {colref},
	{default local}, 
	
	// get the spec limits column property
	plist = colref &amp;lt;&amp;lt; Get Property("Spec Limits");
	// some blank lists to hold the values
	keys = {};
	values = {};
	// loop through the property and get the sub-property name and value
	// put those into the correct lists
	For Each( {value, index}, plist,
		Insert Into( keys, Head Name( value ) );
		Insert Into( values, Arg( value, 1) );
	);
	// build an AA and return as the result of the function
	parameters = Associative Array( keys, values );		
);
 
// open a data table with specs
dt = Open("$Sample_Data/Quality Control/Vial Fill Weights.jmp");

// get the specs from the column
specs = getSpecs(Column("Fill Weight"));

// do something with the values
lsl = specs["LSL"];
tgt = specs["Target"];
usl = specs["USL"];

show(lsl, tgt, usl);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 17:13:34 GMT</pubDate>
    <dc:creator>MikeD_Anderson</dc:creator>
    <dc:date>2023-12-12T17:13:34Z</dc:date>
    <item>
      <title>Trying to extract spec limits from columns</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8859#M8847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to extract column spec limits so I can use in a custom report but I am getting some odd behaviour. Below is a snippet of what I'm doing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear Globals();&lt;/P&gt;&lt;P&gt;dt = Data Table( "blah" );&lt;/P&gt;&lt;P&gt;cols1 = dt &amp;lt;&amp;lt; Get Column Names( numeric, continuous );&lt;/P&gt;&lt;P&gt;For( jj = 1, jj &amp;lt;= N Items( cols1 ), jj++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; spec_x = cols1[jj] &amp;lt;&amp;lt; Get Property( "Spec limits" );&lt;/P&gt;&lt;P&gt;&amp;nbsp; Print(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Char( jj ) || ": Col is " || Char( cols1[jj] &amp;lt;&amp;lt; get name ) || &lt;/P&gt;&lt;P&gt;&amp;nbsp; ", LSL is " || Char( spec_x["lsl"] ) ||&lt;/P&gt;&lt;P&gt;&amp;nbsp; ", USL is " || Char( spec_x["usl"] )&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The print statement is not the real end use, but it serves to show if I've extracted the limits in a useful manner! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, this code works fine for a tiny test table of 2 columns:&lt;/P&gt;&lt;P&gt;"1: Col is X, LSL is 1, USL is 2"&lt;/P&gt;&lt;P&gt;"2: Col is Y, LSL is 3, USL is 7"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which matches what is in my table. But for a larger table of 73 (numeric, continuous) columns, for some reason it fails to put anything into spec_x, I just get:&lt;/P&gt;&lt;P&gt;"1: Col is Rc_N+PO (N/.09/280), LSL is ., USL is ."&lt;/P&gt;&lt;P&gt;"2: Col is Rc_V1 (N/.1/1260), LSL is ., USL is ."&lt;/P&gt;&lt;P&gt;"3: Col is Rc_V2 (N/.1/1188), LSL is ., USL is ."&lt;/P&gt;&lt;P&gt;"4: Col is Rc_V3 (N/.1/1188), LSL is ., USL is ."&lt;/P&gt;&lt;P&gt;"5: Col is Rc_V4 (N/.1/1188), LSL is ., USL is ."&lt;/P&gt;&lt;P&gt;... etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is definitely limit data in the table, I have double checked! So is there any reason why it might not be working? The table is open, the script is clearly getting the column names OK, I just can't make it pick up the limits. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I step though the script and get to spec_x = cols1[jj] &amp;lt;&amp;lt; Get Property( "Spec limits" ); the log shows:&lt;/P&gt;&lt;P&gt;Spec Limits( LSL( 10 ), USL( 50 ), Target( 30 ) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but then when I execute the print statement, it just says:&lt;/P&gt;&lt;P&gt;"1: Col is Rc_N+PO (N/.09/280), LSL is ., USL is ."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matthew.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 15:45:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8859#M8847</guid>
      <dc:creator>matthew5</dc:creator>
      <dc:date>2014-07-01T15:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract spec limits from columns</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8860#M8848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this one work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;Clear Globals&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;data table&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;( "blah" )&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;cols1 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; dt &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;Get Column Names&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; numeric&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; continuous&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"String"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Items &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;cols1&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;For&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; jj &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; jj &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; Items&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; jj&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;BR /&gt;spec_x &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;cols1&lt;STRONG&gt;[&lt;/STRONG&gt;jj&lt;STRONG&gt;])&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;Get Property&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"Spec limits"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;Print&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;Char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; jj &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;": Col is "&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;Char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; cols1&lt;STRONG&gt;[&lt;/STRONG&gt;jj&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;", LSL is "&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;Char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; spec_x&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"lsl"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;||&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;", USL is "&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 10pt;"&gt;Char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; spec_x&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"usl"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 115%; color: black; font-size: 10pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: navy; line-height: 115%; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 18:04:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8860#M8848</guid>
      <dc:creator>dkeshock</dc:creator>
      <dc:date>2014-07-01T18:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract spec limits from columns</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8861#M8849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should work, and it does (JMP 11) in the below example, which is based on your code. Try to insert Wait(0) commands to test if it's a performance problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier; color: #008f00;"&gt;//Make example table&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;new table&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"example"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #032ce4;"&gt;For&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;i&lt;/SPAN&gt;=&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;SPAN style="color: #000000;"&gt; i&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;100&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;SPAN style="color: #000000;"&gt; i&lt;/SPAN&gt;++,&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&amp;nbsp; col&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;dt&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;new column&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"test"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; continuous&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;eval&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;evalexpr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;col&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;set property&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"Spec Limits"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;LSL&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;i&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; USL&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;i&lt;SPAN style="color: #011993;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Target&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;i&lt;SPAN style="color: #011993;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Show Limits&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)})))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier; color: #008f00;"&gt;//Print spec limits&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;cols1 &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; dt &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;Get Column Names&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; continuous &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; jj &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; jj &lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; cols1 &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; jj&lt;SPAN style="color: #011993;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&amp;nbsp; spec_x &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; cols1&lt;STRONG&gt;[&lt;/STRONG&gt;jj&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;Get Property&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"Spec limits"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Print&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; jj &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;": Col is "&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; cols1&lt;STRONG&gt;[&lt;/STRONG&gt;jj&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;get name&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;", LSL is "&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; spec_x&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"lsl"&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;", USL is "&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; spec_x&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"usl"&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 15px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 19:00:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8861#M8849</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-07-01T19:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract spec limits from columns</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8862#M8850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I first tested his it worked up #58 of 81 columns I had in an existing table.&amp;nbsp; I found that the Column names switched conventions in the Cols1 variable at the same point (the first 58 were ":ColumnName" and the rest where without the ':') so I switched to using the string names and it worked fine for me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On your example above, it doesn't run on my end until I change the two "Cols1[jj]" to "Column(cols1[jj])".&amp;nbsp; Is there a reason for that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 19:12:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8862#M8850</guid>
      <dc:creator>dkeshock</dc:creator>
      <dc:date>2014-07-01T19:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract spec limits from columns</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8863#M8851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your replies, but no luck yet. Btw, I am using JMP 11.2 64-bit on Win7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MS: your code worked fine for me when creating a new test table, but didn't when using my table.&lt;/P&gt;&lt;P&gt;dkeshock: your edit didn't help, but did give me a useful pointer how to easily extract column names, thanks :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I may have a root cause now, but still not sure how to solve it. I copied one of my columns to a new table, then created a new test column with manually entered limits. The script works for the new test column:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"1: Col is Rc_N+PO (N/.09/280), LSL is ., USL is ."&lt;/P&gt;&lt;P&gt;"2: Col is Test, LSL is 1, USL is 5"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I looked at the scripts for the two columns (deliberately limited to a few rows):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;New Column( "Rc_N+PO (N/.09/280)",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Numeric, Continuous, Format( "Best", 10 ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Set Property( "Spec Limits", Spec Limits( LSL( 10 ), USL( 50 ), Target( 30 ) ) ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Set Values( [18.306, 18.937, 17.979] )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;New Column( "Test",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Numeric, Continuous, Format( "Best", 12 ), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Set Property( "Spec Limits", {LSL( 1 ), USL( 5 ), Target( 3 ), Show Limits( 0 )} ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Set Values( [2, 3, 4] )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like the code for the spec limits property is different. The only reason I can think is that for my real data, I imported the spec limits from a data table using the capability platform, whereas for the test column I entered it manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could this be the source of my problem? Is there a way around this, or do I need to enter the spec limits manually (or with a script like the one from MS)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matthew.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 09:30:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8863#M8851</guid>
      <dc:creator>matthew5</dc:creator>
      <dc:date>2014-07-02T09:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract spec limits from columns</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8864#M8852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, it appears that,&amp;nbsp; depending on how the spec limits were created, &amp;lt;&amp;lt;get property(...) returns either a list or an expression. I don't know why, but below is en example how to account for both eventualities. I think this approach would work for both lists, expressions and columns without spec limits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;dt&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;New table&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"Example"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;dt &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;New Column&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"NoSpecLimits"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Continuous &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;New Column&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"Rc_N+PO (N/.09/280)"&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Continuous&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Set Property&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"Spec Limits"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Spec Limits&lt;STRONG&gt;(&lt;/STRONG&gt; LSL&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; USL&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;50&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Target&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;30&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;18.306&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;18.937&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;17.979&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;New Column&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"Test"&lt;/SPAN&gt;,&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Continuous&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Set Property&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"Spec Limits"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;LSL&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; USL&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Target&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Show Limits&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)}&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;cols1 &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; dt &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;Get Column Names&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; continuous &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; jj &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; jj &lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; cols1 &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; jj&lt;SPAN style="color: #011993;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; Q &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; cols1&lt;STRONG&gt;[&lt;/STRONG&gt;jj&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;Get Property&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"Spec limits"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; spec_x &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Eval List&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;Arg&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; Q&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Arg&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; Q&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Arg&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; Q&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)}&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;If&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;N Row&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; spec_x&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Empty&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Print&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; jj &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;": Col "&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; cols1&lt;STRONG&gt;[&lt;/STRONG&gt;jj&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;get name&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;", has no spec limits"&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Print&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; jj &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;": Col is "&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; cols1&lt;STRONG&gt;[&lt;/STRONG&gt;jj&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;get name&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;", LSL is "&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; spec_x&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"LSL"&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;", USL is "&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; spec_x&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"USL"&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 11:52:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8864#M8852</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-07-02T11:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract spec limits from columns</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8865#M8853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works now, thank you for your help :)&lt;/img&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 12:52:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/8865#M8853</guid>
      <dc:creator>matthew5</dc:creator>
      <dc:date>2014-07-02T12:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract spec limits from columns</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/708412#M89241</link>
      <description>&lt;P&gt;Related to this discussion - here's a neat little function I wrote to handle pulling specs. &amp;nbsp;It uses expression handling and an Associative Array to make a nice little dictionary that can be used later:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;getSpecs = Function( {colref},
	{default local}, 
	
	// get the spec limits column property
	plist = colref &amp;lt;&amp;lt; Get Property("Spec Limits");
	// some blank lists to hold the values
	keys = {};
	values = {};
	// loop through the property and get the sub-property name and value
	// put those into the correct lists
	For Each( {value, index}, plist,
		Insert Into( keys, Head Name( value ) );
		Insert Into( values, Arg( value, 1) );
	);
	// build an AA and return as the result of the function
	parameters = Associative Array( keys, values );		
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use would look something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

Clear Log();

getSpecs = Function( {colref},
	{default local}, 
	
	// get the spec limits column property
	plist = colref &amp;lt;&amp;lt; Get Property("Spec Limits");
	// some blank lists to hold the values
	keys = {};
	values = {};
	// loop through the property and get the sub-property name and value
	// put those into the correct lists
	For Each( {value, index}, plist,
		Insert Into( keys, Head Name( value ) );
		Insert Into( values, Arg( value, 1) );
	);
	// build an AA and return as the result of the function
	parameters = Associative Array( keys, values );		
);
 
// open a data table with specs
dt = Open("$Sample_Data/Quality Control/Vial Fill Weights.jmp");

// get the specs from the column
specs = getSpecs(Column("Fill Weight"));

// do something with the values
lsl = specs["LSL"];
tgt = specs["Target"];
usl = specs["USL"];

show(lsl, tgt, usl);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 17:13:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-extract-spec-limits-from-columns/m-p/708412#M89241</guid>
      <dc:creator>MikeD_Anderson</dc:creator>
      <dc:date>2023-12-12T17:13:34Z</dc:date>
    </item>
  </channel>
</rss>

