<?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 printing variable to textbox in variability chart in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/printing-variable-to-textbox-in-variability-chart/m-p/795593#M97213</link>
    <description>&lt;DIV&gt;when i run the following script, the charts are producted for each sample, however the textbox print sampleName instead of actually printing the value of the sample name.&amp;nbsp; how do i get around this?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;thanks!&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Create a new window with variability charts for each sample name
New Window("whiteshirts - Variability Chart",
	V List Box(
		Current Data Table(summaryTable);
		For Each Row(
			summaryTable,
			sampleName = Column(summaryTable, "SAMPLE_NAME")[Row()];
			grandMin = Column(summaryTable, "Min(LAB_L)")[Row()];
			grandMax = Column(summaryTable, "Max(LAB_L)")[Row()];
			Print(sampleName, grandMin, grandMax);
 
            /*Text Box( "Where(:SAMPLE_NAME == " || char(sampleName) || ")", &amp;lt;&amp;lt;Set Wrap( 1903 ) );*/
			Text Box(Char(sampleName));
			Print("sampleName is " || sampleName);
			Data Table("whiteshirtsall") &amp;lt;&amp;lt; Variability Chart(
				Y(:LAB_L),
				Model("Main Effect"),
				X(:shirt),
				Variability Analysis(
					:LAB_L,
					Std Dev Chart(0),
					AIAG Labels(0),
					Show Box Plots(1)
				),
				Where(:SAMPLE_NAME == sampleName),
				SendToReport(
					Dispatch(
						{"Variability Gauge Analysis for LAB_L", "Variability Chart for LAB_L"},
						"2", ScaleBox,
						{Add Ref Line(grandMin, "Solid", "Medium Dark Red", "", 2),
						Add Ref Line(grandMax, "Solid", "Medium Dark Red", "", 2),
						Label Row({Show Major Grid(1), Show Minor Grid(1)})}
					)
				)
			);
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
Edit 2024-09-05 jthi: added jsl formatting&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 Sep 2024 11:42:32 GMT</pubDate>
    <dc:creator>Haelavot</dc:creator>
    <dc:date>2024-09-05T11:42:32Z</dc:date>
    <item>
      <title>printing variable to textbox in variability chart</title>
      <link>https://community.jmp.com/t5/Discussions/printing-variable-to-textbox-in-variability-chart/m-p/795593#M97213</link>
      <description>&lt;DIV&gt;when i run the following script, the charts are producted for each sample, however the textbox print sampleName instead of actually printing the value of the sample name.&amp;nbsp; how do i get around this?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;thanks!&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Create a new window with variability charts for each sample name
New Window("whiteshirts - Variability Chart",
	V List Box(
		Current Data Table(summaryTable);
		For Each Row(
			summaryTable,
			sampleName = Column(summaryTable, "SAMPLE_NAME")[Row()];
			grandMin = Column(summaryTable, "Min(LAB_L)")[Row()];
			grandMax = Column(summaryTable, "Max(LAB_L)")[Row()];
			Print(sampleName, grandMin, grandMax);
 
            /*Text Box( "Where(:SAMPLE_NAME == " || char(sampleName) || ")", &amp;lt;&amp;lt;Set Wrap( 1903 ) );*/
			Text Box(Char(sampleName));
			Print("sampleName is " || sampleName);
			Data Table("whiteshirtsall") &amp;lt;&amp;lt; Variability Chart(
				Y(:LAB_L),
				Model("Main Effect"),
				X(:shirt),
				Variability Analysis(
					:LAB_L,
					Std Dev Chart(0),
					AIAG Labels(0),
					Show Box Plots(1)
				),
				Where(:SAMPLE_NAME == sampleName),
				SendToReport(
					Dispatch(
						{"Variability Gauge Analysis for LAB_L", "Variability Chart for LAB_L"},
						"2", ScaleBox,
						{Add Ref Line(grandMin, "Solid", "Medium Dark Red", "", 2),
						Add Ref Line(grandMax, "Solid", "Medium Dark Red", "", 2),
						Label Row({Show Major Grid(1), Show Minor Grid(1)})}
					)
				)
			);
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
Edit 2024-09-05 jthi: added jsl formatting&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Sep 2024 11:42:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/printing-variable-to-textbox-in-variability-chart/m-p/795593#M97213</guid>
      <dc:creator>Haelavot</dc:creator>
      <dc:date>2024-09-05T11:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: printing variable to textbox in variability chart</title>
      <link>https://community.jmp.com/t5/Discussions/printing-variable-to-textbox-in-variability-chart/m-p/795604#M97214</link>
      <description>&lt;P&gt;The text used in filter isn't being evaluated so it will be left as sampleName. Here is one way how you could evaluate it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

Column(dt, 2) &amp;lt;&amp;lt; Set Name("shirt");
Column(dt, 3) &amp;lt;&amp;lt; Set Name("SAMPLE_NAME");
Column(dt, 4) &amp;lt;&amp;lt; Set Name("LAB_L");

dt_summary = dt &amp;lt;&amp;lt; Summary(
	Group(:SAMPLE_NAME),
	Min(:LAB_L),
	Max(:LAB_L),
	Freq("None"),
	Weight("None"),
	Link to original data table(0),
	output table name("Summary of Big Class grouped by SAMPLE_NAME")
);


nw = New Window("whiteshirts - Variability Chart",
	V List Box(
		For Each Row(
			dt_summary,
			sampleName = Column(dt_summary, "SAMPLE_NAME")[Row()];
			grandMin = Column(dt_summary, "Min(LAB_L)")[Row()];
			grandMax = Column(dt_summary, "Max(LAB_L)")[Row()];
			Print(sampleName, grandMin, grandMax);
 
            /*Text Box( "Where(:SAMPLE_NAME == " || char(sampleName) || ")", &amp;lt;&amp;lt;Set Wrap( 1903 ) );*/
			Print("sampleName is " || sampleName);
			Eval(EvalExpr(
				dt &amp;lt;&amp;lt; Variability Chart(
					Y(:LAB_L),
					Model("Main Effect"),
					X(:shirt),
					Variability Analysis(
						:LAB_L,
						Std Dev Chart(0),
						AIAG Labels(0),
						Show Box Plots(1)
					),
					Where(:SAMPLE_NAME == Expr(sampleName)),
					SendToReport(
						Dispatch(
							{"Variability Gauge Analysis for LAB_L", "Variability Chart for LAB_L"},
							"2", ScaleBox,
							{Add Ref Line(grandMin, "Solid", "Medium Dark Red", "", 2),
							Add Ref Line(grandMax, "Solid", "Medium Dark Red", "", 2),
							Label Row({Show Major Grid(1), Show Minor Grid(1)})}
						)
					)
				);
			));
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1725536855554.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67975i8C914B0F4F8B2309/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1725536855554.png" alt="jthi_0-1725536855554.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 11:48:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/printing-variable-to-textbox-in-variability-chart/m-p/795604#M97214</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-09-05T11:48:15Z</dc:date>
    </item>
  </channel>
</rss>

