<?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: Do you know why my script fully runs when I run it manually but it does not work when I run it from a command in the toolbar? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/718153#M90021</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;, we shoud exactly add the&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;TabData &amp;lt;&amp;lt; RunFormulas;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After this comment?&lt;/P&gt;&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;//STARTING FROM HERE THE SCRIPT DOES NOT RUN IN TOOLBAR MODE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if yes, already did and did not work :(&lt;/img&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2024 02:39:53 GMT</pubDate>
    <dc:creator>CrownofTears</dc:creator>
    <dc:date>2024-01-23T02:39:53Z</dc:date>
    <item>
      <title>Do you know why my script fully runs when I run it manually but it does not work when I run it from a command in the toolbar?</title>
      <link>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/673525#M86100</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this script that works 100% when I run it manually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run it from the toolbar(automatically) it does not run the last section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have an idea of why this is happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added a comment in the script in the point is not working anymore:&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;//STARTING FROM HERE THE SCRIPT DOES NOT RUN IN TOOLBAR MODE&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Script for GRR Anlaysis for Qual Data

names = {};
//prueba={};
RepeatabilityData = {};
ReproducibilityData = {};
GaugeRRData = {};
ParttoPartData = {};
NDCData = {};

Datos_table = Current Data Table();

For( i = 1, i &amp;lt;= N Col(), i++, 

	Insert Into( names, Column Name( i ) )
);

dlg1 = Dialog(
	Title( "GR&amp;amp;R" ),
	"Select Tests",
	vlist( selectiontests = List Box( names ) ),
	"Select Channel Column",
	vlist( selectionchannel = List Box( names ) ),
	"Select Category (Pre/Post) Column",
	vlist( selectioncategory = List Box( names ) ),
	"select Devices Number Column",
	vlist( selectionSN = List Box( names ) ),
	synch = Check Box( "Generate Journal", 0 ),
	hlist( button( "OK" ), button( "Cancel" ) )
)
;

if (dlg1["Button"]==1,

	column(dlg1["selectionchannel"])&amp;lt;&amp;lt;set modeling type("Nominal");
	column(dlg1["selectioncategory"])&amp;lt;&amp;lt;set modeling type("Nominal");
	column(dlg1["selectionSN"])&amp;lt;&amp;lt;set modeling type("Nominal");	
	
	Report= New Window("GRR Report",
	
	For(i=1, i&amp;lt;=Nitems(dlg1["selectiontests"]),i++,
		
		uno=Variability Chart(
			Y(dlg1 ["selectiontests"][i]),
			X(dlg1 ["selectionchannel"], dlg1["selectionSN"]),
			Model (Crossed),
			Historical Sigma (0),
			Connect Cell Means (1),
			Show Group Means (1),
			Show Grand Mean (0),
			Show Grand Median (1),
			XBar Control Limits (0),
			S control Limits (1),
			Std Dev Chart (0),
			Mean Plots (0),
			Mean of Std Dev (1),
			//Gauge RR (10,2),
			//Gauge RR Report (0),
			//)
			//Journal Window;	
		
		);
		
		dos=Variability Chart(
		Y(dlg1 ["selectiontests"][i]),
		X(dlg1 ["selectioncategory"], dlg1["selectionSN"]),
		Model (Crossed),
		Historical Sigma (0),
		Variability Chart( 0 ),
		Connect Cell Means (1),
		Show Group Means (1),
		Show Grand Mean (0),
		Show Grand Median (1),
		XBar Control Limits (0),
		S control Limits (1),
		Std Dev Chart (0),
		Mean Plots (1),
		Mean of Std Dev (1),

		
		);
		
		report(uno)[framebox(1)]&amp;lt;&amp;lt;frame size(978,150);
		uno&amp;lt;&amp;lt;Show Grand Mean(1);
		uno&amp;lt;&amp;lt;XBar Control Limits(1);

		report(dos)[framebox(1)]&amp;lt;&amp;lt;frame size(186,150);	
		report(dos)[framebox(2)]&amp;lt;&amp;lt;frame size(300,150);	
		report(dos)[framebox(3)]&amp;lt;&amp;lt;frame size(300,150);	

		
	);

	
	);

//GRR Analysis Data Table


TabWin=Datos_table &amp;lt;&amp;lt; Tabulate(
	Add Table(
		Column Table(
			Analysis Columns(
				(dlg1["selectiontests"])
			),
			Grouping Columns(dlg1 ["selectioncategory"] ),
			Statistics( Mean )
		),
		Row Table( Grouping Columns( :SN, Chan ) )
	)
);
	
TabData = TabWin&amp;lt;&amp;lt; Make Into Data Table;
TabWin &amp;lt;&amp;lt; Close Window;
TabData &amp;lt;&amp;lt;set name("GRR Analysis");

//*
//Section for Deltas in GRR analysis
CurrentDataTable(TabData);

ColNum=NCols();

For (j=3, j&amp;lt;=ColNum, j=j+2,
	
	ColLen=Length(Char(Column name (j)));
	ColName=Left (Char(Column Name(j)),ColLen -5);
	NewCol=Substr(ColName,6);
	
TabData&amp;lt;&amp;lt;New Column(
		"Delta: "||NewCol,
		Numeric,
		Formula(
			(As Column((j))-As Column((j+1)))/As Column(j)
		),
		Format("Percent",5,2)	
	)
);

ColDelta=(ColNum-2)/2;
ColStart=4;

ListDelta = {};

For(k=1, k&amp;lt;=ColDelta, k++,
	
	Insert Into(ListDelta, Column Name (Eval(ColNum+k)));
	TabData &amp;lt;&amp;lt; Move Selected Columns(
		{Column (ColNum+k)}, after(Column(ColStart))
	);
	ColStart=ColStart+3;
	
	
);
//STARTING FROM HERE THE SCRIPT DOES NOT RUN IN TOOLBAR MODE
//Delta Variability
	DeltaVar= New Window("GRR Delta Report",
	
		For(l=1, l&amp;lt;=Nitems(ListDelta),l++,
			
			//Col Std Dev(As Column(ListDelta[12]));
			
			if(Col Std Dev(As Column(ListDelta[l]))&amp;gt;0.4,
				ListDelta[l]&amp;lt;&amp;lt;set property ("Spec Limits",{LSL(-1 ), USL(1),Show Limits( 1 )})
			);
			
			if(Col Std Dev(As Column(ListDelta[l]))&amp;lt;0.4,
				ListDelta[l]&amp;lt;&amp;lt;set property ("Spec Limits",{LSL(-0.1 ), USL( 0.1),Show Limits( 1 )})
			);
			if(Col Std Dev(As Column(ListDelta[l]))&amp;lt;0.001,
				ListDelta[l]&amp;lt;&amp;lt;set property ("Spec Limits",{LSL(-0.01 ), USL( 0.01),Show Limits( 1 )})
			);
		
			tres=Variability Chart(
				Y(ListDelta[l]),
				X(:Chan, :SN),
				Model (Crossed),
				Historical Sigma (0),
				Connect Cell Means (1),
				Show Group Means (1),
				Show Grand Mean (0),
				Show Grand Median (1),
				XBar Control Limits (1),
				S control Limits (1),
				Std Dev Chart (0),
				Mean Plots (0),
				Mean of Std Dev (1),
				//Gauge RR (10,2),
				//Gauge RR Report (0),
			);
			
			//report(tres)[FrameBox(1)]&amp;lt;&amp;lt;frame size(978,150);
			//tres&amp;lt;&amp;lt;Show Grand Mean(1);
			//tres&amp;lt;&amp;lt;XBar Control Limits(1);

		);

	);
	
);
	
	&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Sep 2023 19:31:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/673525#M86100</guid>
      <dc:creator>CrownofTears</dc:creator>
      <dc:date>2023-09-01T19:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Do you know why my script fully runs when I run it manually but it does not work when I run it from a command in the toolbar?</title>
      <link>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/673914#M86137</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/49136"&gt;@CrownofTears&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;when i had these issues in the past i found out that adding Wait (0.1) before the loop and at the end of each loop made it work. in your case i a do not have an obvious suspect for the slow behaviour. i would just put a Wait (0.1) after each ; in the last loop and see if it works &amp;nbsp; &lt;BR /&gt;this solves the issue that sometimes jmp moves on the the next step without making sure the previous has ended. &lt;/P&gt;</description>
      <pubDate>Sun, 03 Sep 2023 22:15:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/673914#M86137</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2023-09-03T22:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Do you know why my script fully runs when I run it manually but it does not work when I run it from a command in the toolbar?</title>
      <link>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/707164#M89160</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/49136"&gt;@CrownofTears&lt;/a&gt; -- way too late, I suppose, but try adding&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;TabData &amp;lt;&amp;lt; RunFormulas;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in place of the comment. JMP's column formulas run when JMP is idle, so running it a section at a time will allow the formulas to evaluate. Adding wait statements might let the formulas have enough idle time to complete, but it is impossible to pick the perfect wait time. &amp;lt;&amp;lt;RunFormulas is fast. Usually JMP can figure out when it needs to force the formulas to finish running; My guess is that&lt;/P&gt;
&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;Col Std Dev(As Column(ListDelta[l]))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is not figuring it out.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 11:52:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/707164#M89160</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-12-08T11:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Do you know why my script fully runs when I run it manually but it does not work when I run it from a command in the toolbar?</title>
      <link>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/718153#M90021</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;, we shoud exactly add the&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;TabData &amp;lt;&amp;lt; RunFormulas;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After this comment?&lt;/P&gt;&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;//STARTING FROM HERE THE SCRIPT DOES NOT RUN IN TOOLBAR MODE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if yes, already did and did not work :(&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 02:39:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/718153#M90021</guid>
      <dc:creator>CrownofTears</dc:creator>
      <dc:date>2024-01-23T02:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Do you know why my script fully runs when I run it manually but it does not work when I run it from a command in the toolbar?</title>
      <link>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/718156#M90023</link>
      <description>&lt;P&gt;(Yes, that was what I meant.)&lt;/P&gt;
&lt;P&gt;I'm guessing.&lt;/P&gt;
&lt;P&gt;Are you getting messages in the log window when it fails? You might add print() statements to isolate the failure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My next guess is the current data table() isn't doing what you expect. Try using explicit data table scoping instead of depending on CurrentDataTable. &lt;/P&gt;
&lt;P&gt;Depending on the CurrentDataTable is a fragile way to build code because&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;it can change when another table becomes current (which seems likely with a new window opening)&lt;/LI&gt;
&lt;LI&gt;it can be different in different contexts (which seems likely with a toolbar context in play)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Another thing to try: uncheck the "use here namespace" in the toolbar to see if it works. That will tell us something too.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 04:13:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Do-you-know-why-my-script-fully-runs-when-I-run-it-manually-but/m-p/718156#M90023</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-01-23T04:13:14Z</dc:date>
    </item>
  </channel>
</rss>

