<?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 Need to compare result from one table with spec limit in another table.  If result &amp;lt; limit then pass in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108671#M39519</link>
    <description>&lt;P&gt;I have a table (Limits) with the limits.&amp;nbsp; The table columns are Product, Componet A, Componet B.&amp;nbsp; Under each componet is the limit.&amp;nbsp; Example Product, Aluminum, Zinc&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fudd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.24&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .50&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another table FG Metals that has a PASS/FAIL column and a Aluminum column and a Zinc column with the results in each row.&amp;nbsp; Example PASS/FAIL, Aluminum, Zinc&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .09&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .1&lt;/P&gt;&lt;P&gt;I need to compare the dt(FG metals) Aluminum .09 result with the dt(Limits) Aluminum .24.&amp;nbsp; If result is less than limit then put Pass in the PASS/FAIL column otherwise put FAIL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully I explained this well enough.&amp;nbsp; Please let me know if you have any questions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wayne&lt;/P&gt;</description>
    <pubDate>Fri, 01 Feb 2019 21:01:03 GMT</pubDate>
    <dc:creator>wjalford</dc:creator>
    <dc:date>2019-02-01T21:01:03Z</dc:date>
    <item>
      <title>Need to compare result from one table with spec limit in another table.  If result &lt; limit then pass</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108671#M39519</link>
      <description>&lt;P&gt;I have a table (Limits) with the limits.&amp;nbsp; The table columns are Product, Componet A, Componet B.&amp;nbsp; Under each componet is the limit.&amp;nbsp; Example Product, Aluminum, Zinc&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fudd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.24&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .50&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another table FG Metals that has a PASS/FAIL column and a Aluminum column and a Zinc column with the results in each row.&amp;nbsp; Example PASS/FAIL, Aluminum, Zinc&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .09&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .1&lt;/P&gt;&lt;P&gt;I need to compare the dt(FG metals) Aluminum .09 result with the dt(Limits) Aluminum .24.&amp;nbsp; If result is less than limit then put Pass in the PASS/FAIL column otherwise put FAIL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully I explained this well enough.&amp;nbsp; Please let me know if you have any questions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wayne&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 21:01:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108671#M39519</guid>
      <dc:creator>wjalford</dc:creator>
      <dc:date>2019-02-01T21:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108672#M39520</link>
      <description>&lt;P&gt;I have attached sample files.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 21:11:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108672#M39520</guid>
      <dc:creator>wjalford</dc:creator>
      <dc:date>2019-02-01T21:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108674#M39521</link>
      <description>&lt;P&gt;Here is a script that I think does what you want&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="passfail.PNG" style="width: 613px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15382i3458258BC9B12C79/image-size/large?v=v2&amp;amp;px=999" role="button" title="passfail.PNG" alt="passfail.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create example data tables
dtLimits = New Table( "Limits",
	New Column( "Product", character, values( {"Fudd"} ) ),
	New Column( "Aluminum", values( {.24} ) ),
	New Column( "Zinc", values( {.50} ) )
);

dtMetals = New Table( "FG Metals",
	add rows( 10 ),
	New Column( "Pass/Fail Aluminum", character ),
	New Column( "Pass/Fail Zinc", character ),
	New Column( "Aluminum", formula( Random Uniform( 0, 1 ) ) ),
	New Column( "Zinc", formula( Random Uniform( 0, 1 ) ) )
);

// Get the names of the columns with the metals data in them
metalsColNames = dtMetals &amp;lt;&amp;lt; get column names( striing, numeric );

// Loop across the columns and down the rows and calculate the pass/fail
For( theColumn = 1, theColumn &amp;lt;= N Items( metalsColNames ), theColumn++,
	target = Column( dtLimits, metalsColNames[theColumn] )[1];
	col = Column( dtMetals, metalsColNames[theColumn] );
	passFail = Column( dtMetals, " Pass/Fail " || metalsColNames[theColumn] );
	For( theRow = 1, theRow &amp;lt;= N Rows( dtMetals ), theRow++,
		If( col[theRow] &amp;lt; target,
			passFail[theRow] = "Fail",
			passFail[theRow] = "Pass"
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Feb 2019 21:31:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108674#M39521</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-02-01T21:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108676#M39523</link>
      <description>JIM,&lt;BR /&gt;In my limit file I have multiple products. Fudd with Aluminum and the limit .05 then Miracle with Aluminum and the limit .02. Each product in the limits file is under the product column. Example Product, Aluminum, Zinc&lt;BR /&gt;Fudd .5 .1&lt;BR /&gt;Miracle .2 .5&lt;BR /&gt;Please let me know how to handle the product.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Wayne&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Feb 2019 22:03:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108676#M39523</guid>
      <dc:creator>wjalford</dc:creator>
      <dc:date>2019-02-01T22:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108678#M39524</link>
      <description>All that has to happen is to find the correct row in the Limits Table, for the Product on the row in the Metals data table.  I will get you a modification of my script that will do that......but don't you need to have more than one Pass/Fail column in your metals data table, because each metal can either pass or fail.....or are you saying that if any metal fails, then it is a fail, but if they all pass then the row passes????</description>
      <pubDate>Fri, 01 Feb 2019 22:45:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108678#M39524</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-02-01T22:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108679#M39525</link>
      <description>If any metal fails, then the sample fails. If all metals pass, then the sample passes.</description>
      <pubDate>Fri, 01 Feb 2019 23:12:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108679#M39525</guid>
      <dc:creator>wjalford</dc:creator>
      <dc:date>2019-02-01T23:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108681#M39527</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL style="list-style-position: inside;"&gt;
&lt;LI&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 27.42px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;The various metals columns in the limits file need to be numeric columns.&lt;/SPAN&gt;&lt;I&gt;&lt;/I&gt;&lt;U&gt;&lt;/U&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 27.42px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp;The Pass/Fail column in the Metals data table needs to be defined as character.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 27.42px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Here is a script that works based upon the example data you supplied.....and with the above changes.&amp;nbsp; The code uses the limits data table to determine what metals to test.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dtLimits = Data Table( "Limits sample (1)" );
dtMetals = Data Table( "FG Sample (1)" );

// Get the names of the columns with the metals data in them
metalsColNames = dtLimits &amp;lt;&amp;lt; get column names( string, numeric );

For( theRow = 1, theRow &amp;lt;= N Rows( dtMetals ), theRow++,
	If( N Rows( dtLimits &amp;lt;&amp;lt; get rows where( dtLimits:product == dtMetals:Product[theRow] ) ) &amp;gt; 0,
		theProductRow = (dtLimits &amp;lt;&amp;lt; get rows where( dtLimits:product == dtMetals:Product[theRow] ))[1];
		result = "Pass";
		For( theColumn = 1, theColumn &amp;lt;= N Items( metalsColNames ), theColumn++,
			target = Column( dtLimits, metalsColNames[theColumn] )[theProductRow];
			col = Column( dtMetals, metalsColNames[theColumn] );
			If( col[theRow] &amp;lt; target,
				result = "Fail"
			);
		);
		dtMetals:Name( "Pass/Fail" )[theRow] = result;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Feb 2019 02:11:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108681#M39527</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-02-02T02:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108767#M39533</link>
      <description>&lt;P&gt;Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works great.&amp;nbsp; Thanks again for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wayne&lt;/P&gt;</description>
      <pubDate>Sun, 03 Feb 2019 15:58:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/108767#M39533</guid>
      <dc:creator>wjalford</dc:creator>
      <dc:date>2019-02-03T15:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/244421#M48151</link>
      <description>&lt;P&gt;Hello TxNelson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need similar solution and I was trying to follow the one you have provided but not able to get my results. Could you please help me --&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables -- one is data table and other is specs table. I need to compare data in main table with the specs in specs table and put it into a new column as 1 (pass) and 0 (fail).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jan 2020 12:57:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/244421#M48151</guid>
      <dc:creator>HSS</dc:creator>
      <dc:date>2020-01-31T12:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/244461#M48158</link>
      <description>&lt;P&gt;I have placed below a solution to your request.&amp;nbsp; However, you need to take the time to read the Scripting Guide, to make sure you understand what I have provided, and also to assist you in understanding the JSL provided in other Discussions&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dtspecs = Data Table ("Specs_Limits");

dt = Data Table ("Table_A");

Loadlimit = dt &amp;lt;&amp;lt; Manage Spec Limits( Y( :BVIA_RES, :COILVIA_RES, :RDR_RES, :TAD_RES, 
:WELGL_RES), Load from Limits Table("Specs_Limits.jmp"), Save to Column Properties (1) );

Loadlimit &amp;lt;&amp;lt; close window;

colNamesList = dt &amp;lt;&amp;lt; get column names(string,continuous);

For( theColumn = 1, theColumn &amp;lt;= N Items( colNamesList ), theColumn++, 

	Clear Symbols( specs );
	specs = Column( dt, colNamesList[theColumn] ) &amp;lt;&amp;lt; get property( "Spec Limits" );
	If( Is Empty( specs ) == 0,
		Eval(
			Substitute(
					Expr(
		
						dt &amp;lt;&amp;lt; New Column( colNamesList[theColumn] || " PASS/Fail",
							numeric,
							CONTINUOUS,
							FORMULA( If( __LSL__ &amp;lt;= __col__ &amp;lt;= __USL__, 1, 0 ) )
						);
						Column( colNamesList[theColumn] || " PASS/Fail" ) &amp;lt;&amp;lt; delete formula;
					),
				Expr( __LSL__ ), specs["LSL"],
				Expr( __col__ ), Parse(":" || colNamesLIst[theColumn] ),
				Expr( __USL__ ), specs["USL"]
			)
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jan 2020 13:57:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/244461#M48158</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-01-31T13:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/244474#M48162</link>
      <description>&lt;P&gt;Hi, Many thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, that is what (reading&amp;nbsp;&lt;SPAN&gt;Scripting Guide&lt;/SPAN&gt;) I am doing now a day. :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 14:20:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/244474#M48162</guid>
      <dc:creator>HSS</dc:creator>
      <dc:date>2020-01-31T14:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245476#M48243</link>
      <description>&lt;P&gt;Hi Nelson,&lt;/P&gt;&lt;P&gt;I an getting following error in the script you send me on Friday. Any help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also why do we use "__" in specs limits like LSL. I was trying to find answer in jmp script guideline but could not understand much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error 1.png" style="width: 474px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/21494i0BD9DB4D2AD3E5FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error 1.png" alt="Error 1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 10:49:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245476#M48243</guid>
      <dc:creator>HSS</dc:creator>
      <dc:date>2020-02-03T10:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245508#M48250</link>
      <description>&lt;P&gt;The line of code that is having an issue, is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column( colNamesList[theColumn] || " PASS/Fail" ) &amp;lt;&amp;lt; delete formula;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The error statement is saying that it can not find the column that is being referenced.&amp;nbsp; The column being referenced should have been created in the statement just before.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( colNamesList[theColumn] || " PASS/Fail",
							numeric,
							CONTINUOUS,
							FORMULA( If( __LSL__ &amp;lt;= __col__ &amp;lt;= __USL__, 1, 0 ) )
						);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What is required for this statement to work, is that both an LSL and a USL exist for the column being referenced in the formula.&amp;nbsp; I suspect this is the issue.&amp;nbsp; I would check to make sure that both LSL and USL exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Concerning your question&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; "&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.4; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Also why do we use "__" in specs limits like LSL&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;This is not a JMP requirement.&amp;nbsp; In the Substitute() function, there is a requirement to have pairs of matching values that JMP is going to use for the substitution.&amp;nbsp; I use the "__" before and after the matching values, just to make the code clear.&amp;nbsp; I also give the name of the matching pair something meaningful.&amp;nbsp; And in this case, the Substitution() function is substituting the LSL, the reference Col and the USL, and so by my convention, I use, __LSL__, __col__ and __USL__.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 14:11:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245508#M48250</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-02-03T14:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245511#M48251</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did that check and made sure that LSL and USL both should be there in specs table. In fact, I also start the For loop -- the Column = 10 where I knew that from column 10th onward, I have specs limits in the table, though it should be taken care by Is Empty statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nothing worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 14:26:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245511#M48251</guid>
      <dc:creator>HSS</dc:creator>
      <dc:date>2020-02-03T14:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245514#M48252</link>
      <description>&lt;P&gt;The Manage Spec Limits, may not be finishing before the code below is processing.&amp;nbsp; Try running just through the Manage Spec Limits.&amp;nbsp; Then once it is complete, run the remaining code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, add&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;show(colNamesList[theColumn] || " PASS/Fail");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Just before line 19&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;		Eval(&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then take a look at what name the code is complaining about&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 14:48:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245514#M48252</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-02-03T14:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245528#M48255</link>
      <description>&lt;P&gt;Hi, Yes it is working if I am running code till manage spec limit first and then the rest of it, And adding&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;show(colNamesList[theColumn] || " PASS/Fail");&amp;nbsp; &amp;nbsp; &amp;nbsp;does&amp;nbsp; not make any difference. Code is still not running in one go, even after adding this line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way I can force to evaluate manage specs limit part first and then move further or can I put some wait (say - 2 sec) commend before going into the for loop ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 15:37:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245528#M48255</guid>
      <dc:creator>HSS</dc:creator>
      <dc:date>2020-02-03T15:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245531#M48257</link>
      <description>&lt;P&gt;You can add a&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;wait(0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; rerun formulas;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 15:41:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245531#M48257</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-02-03T15:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245532#M48258</link>
      <description>&lt;P&gt;dt &amp;lt;&amp;lt; rerun formulas; and&amp;nbsp; wait (0)&amp;nbsp; &amp;nbsp;- none of them is working for me. But yes, if I split my code in two runs -- it is working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other suggestion ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 16:01:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245532#M48258</guid>
      <dc:creator>HSS</dc:creator>
      <dc:date>2020-02-03T16:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245533#M48259</link>
      <description>&lt;P&gt;Whatever the wait time I am putting, it just evaluate only first column and through the same error. But, if I split and run it in two parts -- it is fine ! No idea why ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 16:09:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245533#M48259</guid>
      <dc:creator>HSS</dc:creator>
      <dc:date>2020-02-03T16:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare result from one table with spec limit in another table.  If result &lt; limit th</title>
      <link>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245537#M48261</link>
      <description>&lt;P&gt;Hi TxNelson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the script, if I comment out --&amp;nbsp;&lt;CODE class=" language-jsl"&gt;Column( colNamesList[theColumn] || " PASS/Fail" ) &amp;lt;&amp;lt; delete formula; it&amp;nbsp;is&amp;nbsp;running&amp;nbsp;fine.&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;Just a query -- are we not deleting the column formula, even before we are getting our column? As our column will be complete &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;once we will substitute the values of LSL and USL and we are doing in in the next line of For loop ?&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;colNamesList = dt &amp;lt;&amp;lt; get column names(string,continuous);

For( theColumn = 1, theColumn &amp;lt;= N Items( colNamesList ), theColumn++, 

	Clear Symbols( specs );
	specs = Column( dt, colNamesList[theColumn] ) &amp;lt;&amp;lt; get property( "Spec Limits" );
	If( Is Empty( specs ) == 0, /*show(colNamesList[theColumn] || " PASS/Fail"), Wait (1); */
		Eval(
			Substitute(
					Expr(
		
						dt &amp;lt;&amp;lt; New Column( colNamesList[theColumn] || " PASS/Fail",
							numeric,
							CONTINUOUS,
							FORMULA( If( __LSL__ &amp;lt;= __col__ &amp;lt;= __USL__, 1, 0 ) )
						);
						/* Column( colNamesList[theColumn] || " PASS/Fail" ) &amp;lt;&amp;lt; delete formula;*/
					),
				Expr( __LSL__ ), specs["LSL"],
				Expr( __col__ ), Parse(":" || colNamesLIst[theColumn] ),
				Expr( __USL__ ), specs["USL"]
			)
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Feb 2020 16:25:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-to-compare-result-from-one-table-with-spec-limit-in-another/m-p/245537#M48261</guid>
      <dc:creator>HSS</dc:creator>
      <dc:date>2020-02-03T16:25:34Z</dc:date>
    </item>
  </channel>
</rss>

