<?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: How do I combine these codes? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-these-codes/m-p/357777#M60788</link>
    <description>&lt;P&gt;untested, but split it up into smaller blocks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = Data Table( "Formulation Change Review (new)" );

tab = (dt1 &amp;lt;&amp;lt; Tabulate(
	Add Table(
		Column Table( Grouping Columns( :Lab RFT ), Statistics( Row % ) ),
		Row Table( Grouping Columns( :Grade ) )
	)
)) ;

dt2 = tab &amp;lt;&amp;lt; Make Into Data Table;

gb = dt2 &amp;lt;&amp;lt; Graph Builder(
	Size( 1896, 951 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables(
		X(
			:Grade,
			Order By( :Name( "Row %(Y)" ), Ascending, Order Statistic( "Mean" ) )
		),
		Y( :Name( "Row %(Y)" ) ),
		Overlay( :Grade )
	),
	Elements( Bar( X, Y, Legend( 6 ), Label( "Label by Value" ) ) ),
	SendToReport(
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "RFT % per grade" )} ),
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "RFT%" )} );

tab&amp;lt;&amp;lt;closewindow;
close(dt2,nosave);

// gb is the handle to the graphbuilder report

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;edit: There appear to be missing ) at the end of the graph builder section. Make sure you grab all of the JSL from the save-to-script-window when you paste it together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit 2: just before the close(dt2,nosave) you might want to&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb &amp;lt;&amp;lt; journal;
gb&amp;lt;&amp;lt;closewindow;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;because the graph builder report needs the table open but the journal is self contained. The journal'd graph is not connected to the data and can't do row selection.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2021 12:07:50 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2021-02-10T12:07:50Z</dc:date>
    <item>
      <title>How do I combine these codes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-these-codes/m-p/357759#M60787</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to combine these codes so that they run from the "Formulation Change Review (new)" and closes the new data table/tabulate tab only leaving the graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(Data Table( "Formulation Change Review (new)" ) &amp;lt;&amp;lt;
Tabulate(
	Add Table(
		Column Table( Grouping Columns( :Lab RFT ), Statistics( Row % ) ),
		Row Table( Grouping Columns( :Grade ) )
	)
)) &amp;lt;&amp;lt; Make Into Data Table


Graph Builder(
	Size( 1896, 951 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables(
		X(
			:Grade,
			Order By( :Name( "Row %(Y)" ), Ascending, Order Statistic( "Mean" ) )
		),
		Y( :Name( "Row %(Y)" ) ),
		Overlay( :Grade )
	),
	Elements( Bar( X, Y, Legend( 6 ), Label( "Label by Value" ) ) ),
	SendToReport(
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "RFT % per grade" )} ),
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "RFT%" )} )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:05:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-combine-these-codes/m-p/357759#M60787</guid>
      <dc:creator>JC7</dc:creator>
      <dc:date>2023-06-09T22:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine these codes?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-these-codes/m-p/357777#M60788</link>
      <description>&lt;P&gt;untested, but split it up into smaller blocks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = Data Table( "Formulation Change Review (new)" );

tab = (dt1 &amp;lt;&amp;lt; Tabulate(
	Add Table(
		Column Table( Grouping Columns( :Lab RFT ), Statistics( Row % ) ),
		Row Table( Grouping Columns( :Grade ) )
	)
)) ;

dt2 = tab &amp;lt;&amp;lt; Make Into Data Table;

gb = dt2 &amp;lt;&amp;lt; Graph Builder(
	Size( 1896, 951 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables(
		X(
			:Grade,
			Order By( :Name( "Row %(Y)" ), Ascending, Order Statistic( "Mean" ) )
		),
		Y( :Name( "Row %(Y)" ) ),
		Overlay( :Grade )
	),
	Elements( Bar( X, Y, Legend( 6 ), Label( "Label by Value" ) ) ),
	SendToReport(
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "RFT % per grade" )} ),
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "RFT%" )} );

tab&amp;lt;&amp;lt;closewindow;
close(dt2,nosave);

// gb is the handle to the graphbuilder report

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;edit: There appear to be missing ) at the end of the graph builder section. Make sure you grab all of the JSL from the save-to-script-window when you paste it together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit 2: just before the close(dt2,nosave) you might want to&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb &amp;lt;&amp;lt; journal;
gb&amp;lt;&amp;lt;closewindow;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;because the graph builder report needs the table open but the journal is self contained. The journal'd graph is not connected to the data and can't do row selection.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 12:07:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-combine-these-codes/m-p/357777#M60788</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-02-10T12:07:50Z</dc:date>
    </item>
  </channel>
</rss>

