<?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 Scripting Control Chart for Selected Items from the Process Screening Module in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/806964#M98566</link>
    <description>&lt;P&gt;I have been working to automate a Process Screening Analysis.&lt;BR /&gt;I have a textbox popup which prompts the user to put in a date in the yyyy-mm format. Then I have a button to save the date as a variable. Next, I have a button which runs the Process Screening Analysis. In addition to that, I put in a local data filter using the user input to do the analysis on only that set of the data. This works fine.&lt;BR /&gt;&lt;BR /&gt;However, I also want to take advantage of the&amp;nbsp;Control Chart for Selected Items option which I put as the last argument of the Process Screening module. The second to last argument is Select All. The result I get shows the Control Charts with the correct grouping but not the correct filtering (all data from the data table is used to create the charts).&lt;BR /&gt;&lt;BR /&gt;I have two questions. How can I make sure only the data that has been filtered by the Local Data Filter be used to create the charts?&lt;BR /&gt;(If I create the charts I want using the red triangle from the Process Screening module and then grab that script I will end up with a lot of hardcoded values which might not work for a later analysis)&lt;BR /&gt;&lt;BR /&gt;Second question is how can I recall the control charts for further processing or saving? I have not been able to figure out how to save them to another variable or export them. Earlier I save the process screening analysis to a variable and then use &amp;lt;&amp;lt; report; and save as a powerpoint but only the process screening shows up without the control charts.&lt;BR /&gt;&lt;BR /&gt;Any help or resources would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Here is snipped of my code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;year = Char( Year( Today() ) );
month = Char( Month( Today() ) );
date = Concat Items( {year, month}, "-" );

w = New Window( "Date Filter", 
	Border Box( top( 30 ), bottom( 20 ), Left( 30 ), Right( 30 ), 
		V List Box( 
			H Center Box( Text Box( "Date Filter\!n\!nPlease enter date in yyyy-mm format" ) ),
			Spacer Box( size( 1, 30 ) ), 
			H List Box( Text Box( "Date: " ), b1 = Text Edit Box( date ) ), 
			Spacer Box( size( 1, 15 ) ), 
			Spacer Box( size( 1, 15 ) ), 
			H Center Box( 
				Button Box( "Save Filter Date",
					b2 = b1 &amp;lt;&amp;lt; Get Text();
				)
			),
			H Center Box(
				Button Box( "Get Process Capability",
					Current Data Table( dt2 );
					dt4 = Process Screening(
						Process Variables(
							:"Metric1", :"Metric2",:"Metric3"),
							Grouping( :"MetricA" ),
							Control Chart Type( "Indiv and MR" ),
							Process Performance Graph( 1 ),
							Show Tests( 0 ),
							Target Index( 1 ),
							Cp( 1 ),
							Spec Limits( 1 ),
							Use Limits Table(1,Data Table( dt3 ),Process Variables( :Process ),Grouping( :"MetricA" ),LSL( :LSL ),USL( :USL ),Target( :Target ),Go),
						Local Data Filter(Add Filter( columns( :"ProcessDate" ), Where(:"ProcessDate" == b2 ))),
						SendToReport( Dispatch( {}, "", TableBox, {Sort By Column( 2, 1 )} ) ),
						Select All,
						Control Charts for Selected Items,

					);
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2024 22:28:44 GMT</pubDate>
    <dc:creator>AdditiveRange10</dc:creator>
    <dc:date>2024-10-18T22:28:44Z</dc:date>
    <item>
      <title>Scripting Control Chart for Selected Items from the Process Screening Module</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/806964#M98566</link>
      <description>&lt;P&gt;I have been working to automate a Process Screening Analysis.&lt;BR /&gt;I have a textbox popup which prompts the user to put in a date in the yyyy-mm format. Then I have a button to save the date as a variable. Next, I have a button which runs the Process Screening Analysis. In addition to that, I put in a local data filter using the user input to do the analysis on only that set of the data. This works fine.&lt;BR /&gt;&lt;BR /&gt;However, I also want to take advantage of the&amp;nbsp;Control Chart for Selected Items option which I put as the last argument of the Process Screening module. The second to last argument is Select All. The result I get shows the Control Charts with the correct grouping but not the correct filtering (all data from the data table is used to create the charts).&lt;BR /&gt;&lt;BR /&gt;I have two questions. How can I make sure only the data that has been filtered by the Local Data Filter be used to create the charts?&lt;BR /&gt;(If I create the charts I want using the red triangle from the Process Screening module and then grab that script I will end up with a lot of hardcoded values which might not work for a later analysis)&lt;BR /&gt;&lt;BR /&gt;Second question is how can I recall the control charts for further processing or saving? I have not been able to figure out how to save them to another variable or export them. Earlier I save the process screening analysis to a variable and then use &amp;lt;&amp;lt; report; and save as a powerpoint but only the process screening shows up without the control charts.&lt;BR /&gt;&lt;BR /&gt;Any help or resources would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Here is snipped of my code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;year = Char( Year( Today() ) );
month = Char( Month( Today() ) );
date = Concat Items( {year, month}, "-" );

w = New Window( "Date Filter", 
	Border Box( top( 30 ), bottom( 20 ), Left( 30 ), Right( 30 ), 
		V List Box( 
			H Center Box( Text Box( "Date Filter\!n\!nPlease enter date in yyyy-mm format" ) ),
			Spacer Box( size( 1, 30 ) ), 
			H List Box( Text Box( "Date: " ), b1 = Text Edit Box( date ) ), 
			Spacer Box( size( 1, 15 ) ), 
			Spacer Box( size( 1, 15 ) ), 
			H Center Box( 
				Button Box( "Save Filter Date",
					b2 = b1 &amp;lt;&amp;lt; Get Text();
				)
			),
			H Center Box(
				Button Box( "Get Process Capability",
					Current Data Table( dt2 );
					dt4 = Process Screening(
						Process Variables(
							:"Metric1", :"Metric2",:"Metric3"),
							Grouping( :"MetricA" ),
							Control Chart Type( "Indiv and MR" ),
							Process Performance Graph( 1 ),
							Show Tests( 0 ),
							Target Index( 1 ),
							Cp( 1 ),
							Spec Limits( 1 ),
							Use Limits Table(1,Data Table( dt3 ),Process Variables( :Process ),Grouping( :"MetricA" ),LSL( :LSL ),USL( :USL ),Target( :Target ),Go),
						Local Data Filter(Add Filter( columns( :"ProcessDate" ), Where(:"ProcessDate" == b2 ))),
						SendToReport( Dispatch( {}, "", TableBox, {Sort By Column( 2, 1 )} ) ),
						Select All,
						Control Charts for Selected Items,

					);
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 22:28:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/806964#M98566</guid>
      <dc:creator>AdditiveRange10</dc:creator>
      <dc:date>2024-10-18T22:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Control Chart for Selected Items from the Process Screening Module</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/807000#M98573</link>
      <description>&lt;P&gt;Is your filter working correctly for process screening? I did simple test using jmps sample data.&lt;/P&gt;
&lt;P&gt;Filtered to only lot01&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1729317383636.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69326i6EA70D7118139920/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1729317383636.png" alt="jthi_0-1729317383636.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and when I create control chart for selected I can see it has been filtered&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1729317406807.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69327i0AC321239428FC3A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1729317406807.png" alt="jthi_1-1729317406807.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The control charts will open in a new window. To capture that you can use &amp;lt;&amp;lt; get window list + &amp;lt;&amp;lt; get window title and check which is your window. It is named "Selected Charts" if more than one is created AND "Selected Charts" doesn't yet exist&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2024 05:59:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/807000#M98573</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-10-19T05:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Control Chart for Selected Items from the Process Screening Module</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/807255#M98629</link>
      <description>&lt;P&gt;Hello jthi,&lt;BR /&gt;&lt;BR /&gt;Yes the local data filter is definitely working correctly for the process capability portion of the analysis. If I have the data filtered and select the metrics I want (which is all) and then go to the red triangle and select Control Charts for selected items then I get the filtered control chart which is what I am looking for. If I keep using my code as pasted above the unfiltered (all data) control charts are outputted.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 14:59:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/807255#M98629</guid>
      <dc:creator>AdditiveRange10</dc:creator>
      <dc:date>2024-10-21T14:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Control Chart for Selected Items from the Process Screening Module</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/807259#M98630</link>
      <description>&lt;P&gt;This seems to be at least working&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

ps = dt &amp;lt;&amp;lt; Process Screening(
	Process Variables(
		:NPN1, :PNP1, :PNP2, :NPN2, :PNP3, :IVP1, :PNP4, :NPN3, :IVP2, :NPN4, :SIT1,
		:INM1
	),
	Control Chart Type("Indiv and MR"),
	RowStates([0 1, 10 1, 11 1]),
	Local Data Filter(
		Add Filter(
			columns(:lot_id),
			Where(:lot_id == {"lot01", "lot02", "lot03", "lot04"}),
			Display(:lot_id, N Items(13))
		)
	)
);

ps &amp;lt;&amp;lt; Select All;
ps &amp;lt;&amp;lt; Control Charts for Selected Items;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Oct 2024 15:18:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/807259#M98630</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-10-21T15:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Control Chart for Selected Items from the Process Screening Module</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/807271#M98631</link>
      <description>&lt;P&gt;Yes this seems to work. Thank you for the help&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 15:26:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Control-Chart-for-Selected-Items-from-the-Process/m-p/807271#M98631</guid>
      <dc:creator>AdditiveRange10</dc:creator>
      <dc:date>2024-10-21T15:26:09Z</dc:date>
    </item>
  </channel>
</rss>

