<?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: Combining For loop and Dispatch() command in a variability chart in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49342#M28050</link>
    <description>&lt;P&gt;Your code snippet does not allow me to figure out the issue.&amp;nbsp; My initial suggestion is to shut down JMP and then restart it.&amp;nbsp; On rare occasions JMP will get confused.&amp;nbsp; Restarting JMP will clear that memory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be useful if you could provide the complete script and a sample data table.&lt;/P&gt;</description>
    <pubDate>Sat, 06 Jan 2018 05:58:19 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-01-06T05:58:19Z</dc:date>
    <item>
      <title>Combining For loop and Dispatch() command in a variability chart</title>
      <link>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49130#M27922</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to JMP and programming in general. My current challenge:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large data table with 800 columns. Now I would like to create box plots using the Variability Chart, but using a list, in which&amp;nbsp;I first define which columns out of the 800 I would like to use. Then I create a For-loop as shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the proper syntax to get the concat to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Datalist_log = {Test1, Test2, Test33, Test50}; //first I define the list with the tests I Need. It needs to be like this in the code.

imax = N Items( Datalist );

//Boxplots
For( i = 1, i &amp;lt;= imax, i++, 
	Variability Chart(
		Y( Datalist_log[i] ), //Loop cycling through the list putting the respective column on the Y axis
		X( :wafernr ),
		Max Iter( 100 ),
		Conv Limit( 0.00000001 ),
		Number Integration Abscissas( 128 ),
		Number Function Evals( 65536 ),
		Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
		Std Dev Chart( 1 ),
		Show Box Plots( 1 ),
		SendToReport(
			Dispatch(
				{"Variability Chart for Test1"}, &lt;BR /&gt;// This is how it looks when it works. &lt;BR /&gt;//But I need to replace the hard coded string with an element from&lt;BR /&gt;//the list defined above as a part of the Loop, for example:
				{"Variability Chart for " ||Datalist_log[i]}, &lt;BR /&gt;//This is my most promising attempt. But I have failed to understand how the concat works.
//If i manually change the argument to &lt;BR /&gt;//{"Variability Chart for XYSomethingElse"}, the outcome is the same, meaning that the &lt;BR /&gt;//formatting commands (lot plot, scientific axis etc.) that follow are all ignored.
				"2",
				ScaleBox,
				{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000000001 ), Max( 0.000001 ), Inc( 1 ), Minor Ticks( 0 ),
				Add Ref Line( UpperSpec_log[i], "Dotted", "Black", "USL", 2 )}
			),
			Dispatch(
				{"Variability Chart for Test1"},
				"Variability Chart",
				FrameBox,
				{Frame Size( 600, 240 ), Marker Size( 1 ), 
				DispatchSeg( Box Plot Seg( 1 ),	{Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ), 
				DispatchSeg( Box Plot Seg( 2 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 3 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 4 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 5 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 6 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 7 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 8 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 9 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 10 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 11 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 12 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 13 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 14 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 15 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 16 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 17 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 18 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 19 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 20 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 21 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 22 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 23 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 24 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
				DispatchSeg( Box Plot Seg( 25 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} )}
			),
			Dispatch( {"Variability Chart for Test1"}, "", NomAxisBox, {Set Width( 573 ), Set Height( 21 )} ),
			Dispatch( {"Variability Chart for Test1"}, "Varability Std Chart", FrameBox, {Frame Size( 559, 180 )} )
		)
	//)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 12:12:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49130#M27922</guid>
      <dc:creator>PS</dc:creator>
      <dc:date>2018-01-02T12:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Combining For loop and Dispatch() command in a variability chart</title>
      <link>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49136#M27928</link>
      <description>&lt;P&gt;Here is a rework of you code, using a very powerful capability in JSL, Substitution.&amp;nbsp; I commented out your UpperSpec_log reference line, since I didn't have that list available.&amp;nbsp; However, Variability Chart Platform will automatically plot those spec limits, if you add them as Column Properties to your columns, before running the Variability Chart Platform.&amp;nbsp; Once the limits are added as Column Properties, many of the platforms will allow for the displaying of the Spec Limits.&lt;/P&gt;
&lt;P&gt;Here is my reworked code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Semiconductor Capability.jmp" );
Try(dt:Wafer &amp;lt;&amp;lt; Set Name( "wafernr" ));

Datalist_log = {NPN1, PNP1, NPN2}; //first I define the list with the tests I Need. It needs to be like this in the code.

imax = N Items( Datalist_log );

//Boxplots
For( i = 1, i &amp;lt;= imax, i++,
	Eval(
		Substitute(
				Expr(
					Variability Chart(
						Y( __DataList__ ), //Loop cycling through the list putting the respective column on the Y axis
						X( :wafernr ),
						Max Iter( 100 ),
						Conv Limit( 0.00000001 ),
						Number Integration Abscissas( 128 ),
						Number Function Evals( 65536 ),
						Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
						Std Dev Chart( 1 ),
						Show Box Plots( 1 ),
						SendToReport(
							Dispatch(
								{__VarChart__}, 
								// This is how it looks when it works. 
								//But I need to replace the hard coded string with an element from
								//the list defined above as a part of the Loop, for example:
								//{"Variability Chart for " || Datalist_log[i]}, 
								//This is my most promising attempt. But I have failed to understand how the concat works.
								//If i manually change the argument to 
								//{"Variability Chart for XYSomethingElse"}, the outcome is the same, meaning that the 
								//formatting commands (lot plot, scientific axis etc.) that follow are all ignored.
								"2",
								ScaleBox,
								{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000000001 ), Max( 0.000001 ), Inc( 1 ), Minor Ticks( 0 )//,
								//Add Ref Line( UpperSpec_log[i], "Dotted", "Black", "USL", 2 )
									
								}
							),
							Dispatch(
								{__VarChart__},
								"Variability Chart",
								FrameBox,
								{Frame Size( 600, 240 ), Marker Size( 1 ), DispatchSeg(
									Box Plot Seg( 1 ),
									{Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )}
								), DispatchSeg( Box Plot Seg( 2 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 3 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 4 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 5 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 6 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 7 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 8 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 9 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 10 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 11 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 12 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 13 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 14 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 15 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 16 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 17 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 18 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 19 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 20 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 21 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 22 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 23 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 24 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ),
								DispatchSeg( Box Plot Seg( 25 ), {Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} )}
							),
							Dispatch( {__VarChart__}, "", NomAxisBox, {Set Width( 573 ), Set Height( 21 )} ),
							Dispatch( {__VarChart__}, "Varability Std Chart", FrameBox, {Frame Size( 559, 180 )} )
						)
					)
				),
			Expr( __DataList__ ), Parse( ":" || Char( DataList_Log[i] ) ),
			Expr( __VarChart__ ), "Variability Chart for " || Char( DataList_Log[i] )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Jan 2018 16:22:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49136#M27928</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-01-02T16:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combining For loop and Dispatch() command in a variability chart</title>
      <link>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49286#M28016</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something happened after editing my post 4-5 times, the site said it needs to be reviewed before it becomes visible and then it disappeared. Thats why I didnt see the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact, after posting the initial question&amp;nbsp;I did something goofy and it worked, so I thought I had it worked out. But then I found it works no matter what I write after Dispatch() (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to figure out what&amp;nbsp;Eval, Expr, and Substitute actually do. Thanks a lot&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( q = 1, q &amp;lt;= kmax, q++, 	
	Variability Chart(
		Y( Datalist_log[q] ),
		X( :wafernr ),
		Max Iter( 100 ),
		Conv Limit( 0.00000001 ),
		Number Integration Abscissas( 128 ),
		Number Function Evals( 65536 ),
		Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
		Std Dev Chart( 1 ),
		Show Box Plots( 1 ),
		Disp_String = concat Items ({VarChartText,Datalist_log[q]}), //This is useless
		SendToReport(
			Dispatch(Disp_stringxyuz12034823048, //Does not matter what I write here
				"2",
				ScaleBox,
				{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000000001 ), Max( 0.000001 ), Inc( 1 ), Minor Ticks( 0 ),
				Add Ref Line( UpperSpec_log[q], "Dotted", "Black", "USL", 2 )}
				),
			Dispatch(Disp_Stringsomethingelse,
				"Variability Chart",
				FrameBox,
				{Frame Size( 600, 240 ), Marker Size( 1 ), 
				DispatchSeg( Box Plot Seg( 1 ),	{Box Type( "Outlier" ), Line Color( "Red" ), Line Width( 2 )} ), 
				DispatchSeg( Box Plot S
...
...
...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jan 2018 08:21:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49286#M28016</guid>
      <dc:creator>PS</dc:creator>
      <dc:date>2018-01-05T08:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Combining For loop and Dispatch() command in a variability chart</title>
      <link>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49342#M28050</link>
      <description>&lt;P&gt;Your code snippet does not allow me to figure out the issue.&amp;nbsp; My initial suggestion is to shut down JMP and then restart it.&amp;nbsp; On rare occasions JMP will get confused.&amp;nbsp; Restarting JMP will clear that memory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be useful if you could provide the complete script and a sample data table.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2018 05:58:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combining-For-loop-and-Dispatch-command-in-a-variability-chart/m-p/49342#M28050</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-01-06T05:58:19Z</dc:date>
    </item>
  </channel>
</rss>

