<?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: A script works in JMP PRO but not in JMP LIVE to query data and add spec limits to JMP LIVE control chart in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/A-script-works-in-JMP-PRO-but-not-in-JMP-LIVE-to-query-data-and/m-p/754934#M93735</link>
    <description>&lt;P&gt;I think the problem is your refresh script does not return a data table.&amp;nbsp; If you add:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myDT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to the end of your script, does that make it work in JMP Live?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know.&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;Eric&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 12:50:45 GMT</pubDate>
    <dc:creator>Eric_Hill</dc:creator>
    <dc:date>2024-05-16T12:50:45Z</dc:date>
    <item>
      <title>A script works in JMP PRO but not in JMP LIVE to query data and add spec limits to JMP LIVE control chart</title>
      <link>https://community.jmp.com/t5/Discussions/A-script-works-in-JMP-PRO-but-not-in-JMP-LIVE-to-query-data-and/m-p/742991#M92273</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I wrote a script that 1) queries a table(myDT) to build a control chart on and 2)&amp;nbsp;another table(&lt;CODE class=" language-jsl"&gt;specLimitsTable)&lt;/CODE&gt; and 3) a loop that takes data from the second table to set spec limits on table 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works just fine in JMP PRO and steps 1) and 2) work fine in JMP LIVE but when I add the 3rd part it says failed to regenerate when I go to refresh my data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The JSL that works in JMP PRO is below:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myDT = Open Database(
    "APP=JMP;DATABASE=BBAnalytics;DRIVER={SQL Server};Description=BB Analytics Data Warehouse;Trusted_Connection=Yes;UID=%_UID_%;WSID=SFX-JPCZ724;SERVER=SFX-DWA01;DBCNAME=SFX-DWA01;",
    "SELECT * FROM [dbo].[DDGSControlChartDataBPX]",
    "myDT"
);
specLimitsTable = Open Database(
    "APP=JMP;DATABASE=BBAnalytics;DRIVER={SQL Server};Description=BB Analytics Data Warehouse;Trusted_Connection=Yes;UID=%_UID_%;WSID=SFX-JPCZ724;SERVER=SFX-DWA01;DBCNAME=SFX-DWA01;",
    "SELECT * FROM [dbo].[PivotSpecLimitsMediansBPXF]",
    "specDTTest"
);

// Iterate over the rows of the spec limits table
For Each Row(specLimitsTable,
    // Get values from the current row
    column_name = Column(specLimitsTable, "Column_Name")[Row()];
    lsl = Column(specLimitsTable, "LSL")[Row()];
    usl = Column(specLimitsTable, "USL")[Row()];

    // Set spec limits for the corresponding column in the main data table
    
    col_ref = Column(myDT, column_name);
    Eval(
	Eval Expr(
		col_ref &amp;lt;&amp;lt; Set Property(
			"Spec Limits",
			{LSL( Expr( lsl ) ), USL( Expr( usl ) ),
			Show Limits( 1 )}
		)
	)
););&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Apr 2024 21:22:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/A-script-works-in-JMP-PRO-but-not-in-JMP-LIVE-to-query-data-and/m-p/742991#M92273</guid>
      <dc:creator>bjbreitling</dc:creator>
      <dc:date>2024-04-01T21:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: A script works in JMP PRO but not in JMP LIVE to query data and add spec limits to JMP LIVE control chart</title>
      <link>https://community.jmp.com/t5/Discussions/A-script-works-in-JMP-PRO-but-not-in-JMP-LIVE-to-query-data-and/m-p/754928#M93731</link>
      <description>&lt;P&gt;A couple of things to try - First, change the Open Table() structure to New SQL Query(). Second, try using Manage Limits() with the "Save to Column Properties" message instead of the loop. &amp;nbsp;You can find examples of both in the scripting index. Query Builder could also be used to create the query calls graphically. You can then use the Red Triangle Menu option to save out a finished script snippet.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 10:52:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/A-script-works-in-JMP-PRO-but-not-in-JMP-LIVE-to-query-data-and/m-p/754928#M93731</guid>
      <dc:creator>MikeD_Anderson</dc:creator>
      <dc:date>2024-05-16T10:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: A script works in JMP PRO but not in JMP LIVE to query data and add spec limits to JMP LIVE control chart</title>
      <link>https://community.jmp.com/t5/Discussions/A-script-works-in-JMP-PRO-but-not-in-JMP-LIVE-to-query-data-and/m-p/754934#M93735</link>
      <description>&lt;P&gt;I think the problem is your refresh script does not return a data table.&amp;nbsp; If you add:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myDT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to the end of your script, does that make it work in JMP Live?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know.&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;Eric&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 12:50:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/A-script-works-in-JMP-PRO-but-not-in-JMP-LIVE-to-query-data-and/m-p/754934#M93735</guid>
      <dc:creator>Eric_Hill</dc:creator>
      <dc:date>2024-05-16T12:50:45Z</dc:date>
    </item>
  </channel>
</rss>

