<?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: Stack with spec limits in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60232#M32854</link>
    <description>&lt;P&gt;Here is a simple script that will illustrate one way to do this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dtOrig = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

// Modify the data to make it simpler for the example
dtOrig &amp;lt;&amp;lt; delete columns( 10 :: 132 );
dtOrig &amp;lt;&amp;lt; delete columns( 1 :: 4 );
dtOrig &amp;lt;&amp;lt; select where( Row() &amp;gt; 50 );
dtOrig &amp;lt;&amp;lt; delete rows;

// Stack the data
dtStacked = dtOrig &amp;lt;&amp;lt; Stack(
	columns( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3 ),
	Source Label Column( "Parameter" ),
	Stacked Data Column( "Value" ),
	Output Table( "Stacked" )
);

// Create the new columns
dtStacked &amp;lt;&amp;lt; New Column( "Lower Spec Limit" );
dtStacked &amp;lt;&amp;lt; New Column( "Upper Spec Limit" );

// Move the Spec Limits
colList = dtOrig &amp;lt;&amp;lt; get column names( string );
For( i = 1, i &amp;lt;= N Items( colList ), i++,
	specs = Column( dtOrig, colList[i] ) &amp;lt;&amp;lt; get property( "spec limits" );
	foundRows = dtStacked &amp;lt;&amp;lt; get rows where( dtStacked:Parameter == colList[i] );
	dtStacked:Lower Spec Limit[foundRows] = specs["LSL"];
	dtStacked:Upper Spec Limit[foundRows] = specs["USL"];
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Jun 2018 13:03:55 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-06-13T13:03:55Z</dc:date>
    <item>
      <title>Stack with spec limits</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60223#M32845</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How can I perform new table by stack for several columns with spec limits (as properties) and create two new columns with spec low and spec high each Label according to initial table properties?&lt;/P&gt;&lt;P&gt;See attached&lt;/P&gt;&lt;P&gt;If possible, also pass/fail column&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Assaf&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 10:45:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60223#M32845</guid>
      <dc:creator>Assaf1</dc:creator>
      <dc:date>2018-06-13T10:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Stack with spec limits</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60232#M32854</link>
      <description>&lt;P&gt;Here is a simple script that will illustrate one way to do this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dtOrig = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

// Modify the data to make it simpler for the example
dtOrig &amp;lt;&amp;lt; delete columns( 10 :: 132 );
dtOrig &amp;lt;&amp;lt; delete columns( 1 :: 4 );
dtOrig &amp;lt;&amp;lt; select where( Row() &amp;gt; 50 );
dtOrig &amp;lt;&amp;lt; delete rows;

// Stack the data
dtStacked = dtOrig &amp;lt;&amp;lt; Stack(
	columns( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3 ),
	Source Label Column( "Parameter" ),
	Stacked Data Column( "Value" ),
	Output Table( "Stacked" )
);

// Create the new columns
dtStacked &amp;lt;&amp;lt; New Column( "Lower Spec Limit" );
dtStacked &amp;lt;&amp;lt; New Column( "Upper Spec Limit" );

// Move the Spec Limits
colList = dtOrig &amp;lt;&amp;lt; get column names( string );
For( i = 1, i &amp;lt;= N Items( colList ), i++,
	specs = Column( dtOrig, colList[i] ) &amp;lt;&amp;lt; get property( "spec limits" );
	foundRows = dtStacked &amp;lt;&amp;lt; get rows where( dtStacked:Parameter == colList[i] );
	dtStacked:Lower Spec Limit[foundRows] = specs["LSL"];
	dtStacked:Upper Spec Limit[foundRows] = specs["USL"];
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:03:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60232#M32854</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-13T13:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Stack with spec limits</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60302#M32873</link>
      <description>&lt;P&gt;Thanks a lot!!&lt;/P&gt;&lt;P&gt;Using your support I performed the follows script:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;BTW, How can I add popup window to modify the red line?&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Here is a simple script that will illustrate one way to do this&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dtOrig = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

// Modify the data to make it simpler for the example
dtOrig &amp;lt;&amp;lt; delete columns( 10 :: 132 );
dtOrig &amp;lt;&amp;lt; delete columns( 1 :: 4 );
dtOrig &amp;lt;&amp;lt; select where( Row() &amp;gt; 50 );
dtOrig &amp;lt;&amp;lt; delete rows;

// Stack the data
dtStacked = dtOrig &amp;lt;&amp;lt; Stack(
	columns( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3 ),
	Source Label Column( "Parameter" ),
	Stacked Data Column( "Value" ),
	Output Table( "Stacked" )
);

// Create the new columns
dtStacked &amp;lt;&amp;lt; New Column( "Lower Spec Limit" );
dtStacked &amp;lt;&amp;lt; New Column( "Upper Spec Limit" );

// Move the Spec Limits
colList = dtOrig &amp;lt;&amp;lt; get column names( string );
For( i = 1, i &amp;lt;= N Items( colList ), i++,
	specs = Column( dtOrig, colList[i] ) &amp;lt;&amp;lt; get property( "spec limits" );
	foundRows = dtStacked &amp;lt;&amp;lt; get rows where( dtStacked:Parameter == colList[i] );
	dtStacked:Lower Spec Limit[foundRows] = specs["LSL"];
	dtStacked:Upper Spec Limit[foundRows] = specs["USL"];
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;// Stack the data&lt;BR /&gt;dtOrig = currentdatatable();&lt;BR /&gt;dtStacked = dtOrig &amp;lt;&amp;lt; Stack(&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;columns( 26 :: 42 ),&lt;/FONT&gt;&lt;BR /&gt;Source Label Column( "Parameter" ),&lt;BR /&gt;Stacked Data Column( "Value" ),&lt;BR /&gt;Output Table( "Stacked" )&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;// Create the new columns&lt;BR /&gt;dtStacked &amp;lt;&amp;lt; New Column( "Lower Spec Limit" );&lt;BR /&gt;dtStacked &amp;lt;&amp;lt; New Column( "Upper Spec Limit" );&lt;/P&gt;&lt;P&gt;// Move the Spec Limits&lt;BR /&gt;colList = dtOrig &amp;lt;&amp;lt; get column names( string );&lt;BR /&gt;For( i = 1, i &amp;lt;= N Items( colList ), i++,&lt;BR /&gt;specs = Column( dtOrig, colList[i] ) &amp;lt;&amp;lt; get property( "spec limits" );&lt;BR /&gt;foundRows = dtStacked &amp;lt;&amp;lt; get rows where( dtStacked:Parameter == colList[i] );&lt;BR /&gt;dtStacked:Lower Spec Limit[foundRows] = specs["LSL"];&lt;BR /&gt;dtStacked:Upper Spec Limit[foundRows] = specs["USL"];&lt;BR /&gt;);&lt;BR /&gt;New Column("P/F", Numeric, "Continuous", Formula((:Lower Spec Limit &amp;lt;= :Value &amp;lt;= :Upper Spec Limit) == 0));&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 05:51:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60302#M32873</guid>
      <dc:creator>Assaf1</dc:creator>
      <dc:date>2018-06-14T05:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Stack with spec limits</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60313#M32883</link>
      <description>&lt;P&gt;The best way to learn about this is in the Scripting Guide.&amp;nbsp; See:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Books==&amp;gt;Scripting Guide........Construct a Column Dialog&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 12:31:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60313#M32883</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-14T12:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Stack with spec limits</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60315#M32885</link>
      <description>&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 13:20:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-with-spec-limits/m-p/60315#M32885</guid>
      <dc:creator>Assaf1</dc:creator>
      <dc:date>2018-06-14T13:20:57Z</dc:date>
    </item>
  </channel>
</rss>

