<?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: Loop through &amp;quot;SendToReport&amp;quot; element in process screener in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713980#M89741</link>
    <description>&lt;P&gt;Perfect, thanks!!&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jan 2024 22:29:23 GMT</pubDate>
    <dc:creator>shampton82</dc:creator>
    <dc:date>2024-01-07T22:29:23Z</dc:date>
    <item>
      <title>Loop through "SendToReport" element in process screener</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713879#M89732</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;I am trying to loop though a Proces Screener script that makes the "Charts as selected" report element.&amp;nbsp; I need it to be flexible as the number of Reponses in the screener can change over time.&amp;nbsp; So I tried putting in this loop to change the axis format of the charts but alas it does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	SendToReport(
		Dispatch( {}, "", TableBox, {Sort By Column( 2, 1 )} ),
		Dispatch( {}, "Charts as Selected", OutlineBox, {Close( 1 )} ),
		For( i = 1, i &amp;lt;= 422, i++,
			Dispatch(
				{"Charts as Selected"},
				"1",
				ScaleBox(i),
				{Format( "m/d/y", 10 ), Min( 3784397666.7875 ), Max( 3787415686.74375 ), Interval( "Week" ), Inc( 1 ), Minor Ticks( 6 ),
				Label Row( {Label Orientation( "Perpendicular" ), Show Major Grid( 1 )} )}
			),
			Dispatch( {"Charts as Selected"}, "ProcessScreening Graph As Selected", FrameBox( i ), {Frame Size( 602, 255 )} ),
		)
		
	)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;this is a section of code that show the repetition I am trying to loop over&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;SendToReport(
		Dispatch( {}, "", TableBox, {Sort By Column( 2, 1 )} ),
		&lt;STRONG&gt;Dispatch({"Charts as Selected"},
			"1",
			ScaleBox,
			{Min( 3784397666.7875 ), Max( 3787415686.74375 ), Interval( "Week" ), Inc( 1 ), Minor Ticks( 6 ),
			Label Row( {Label Orientation( "Perpendicular" ), Show Major Grid( 1 )} )}
		),
		Dispatch( {"Charts as Selected"}, "ProcessScreening Graph As Selected", FrameBox, {Frame Size( 602, 255 )} ),
		Dispatch(
			{"Charts as Selected"},
			"1",
			ScaleBox( 2 ),
			{Min( 3784397666.7875 ), Max( 3787415686.74375 ), Interval( "Week" ), Inc( 1 ), Minor Ticks( 6 ),
			Label Row( {Label Orientation( "Perpendicular" ), Show Major Grid( 1 )} )}
		),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;        Dispatch( {"Charts as Selected"}, "ProcessScreening Graph As Selected", FrameBox( 2 ), {Frame Size( 602, 255 )} ),&lt;/STRONG&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any guidance would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 19:42:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713879#M89732</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2024-01-06T19:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through "SendToReport" element in process screener</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713886#M89733</link>
      <description>&lt;P&gt;Without knowing what you are really trying do, I would suggest that you modify them after selections have been done by getting references to those axis (scaleboxes) using &amp;lt;&amp;lt; XPath and then modifying that list by sending message(s) to that list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
obj = dt &amp;lt;&amp;lt; Process Screening(
	Process Variables(Column Group("Processes")),
	Grouping(:SITE),
	Control Chart Type("Indiv and MR"),
	Show Charts as Selected(1),
	RowStates([0 1, 171 1, 245 1])
);

scs = Report(obj) &amp;lt;&amp;lt; XPath("//ScaleBox");
xaxis_idx = 2::N Items(scs)::3;
scs[xaxis_idx] &amp;lt;&amp;lt; Min(-100) &amp;lt;&amp;lt; Max(400) &amp;lt;&amp;lt; Inc(100) &amp;lt;&amp;lt; Inc(100) &amp;lt;&amp;lt; Minor Tics(2);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 06 Jan 2024 20:32:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713886#M89733</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-06T20:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through "SendToReport" element in process screener</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713973#M89739</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;!!&lt;/P&gt;&lt;P&gt;That worked great.&amp;nbsp; I ended up add in my stuff as so:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;scs = Report(psobj) &amp;lt;&amp;lt; XPath("//ScaleBox");
xaxis_idx = 2::N Items(cnames)::3;
scs[xaxis_idx] &amp;lt;&amp;lt; Min(3784397666.7875) &amp;lt;&amp;lt; Max(3787415686.74375) &amp;lt;&amp;lt; Interval( "Week" ) &amp;lt;&amp;lt; Inc( 1 ) &amp;lt;&amp;lt; Minor Ticks( 6 )&amp;lt;&amp;lt;Label Row( {Label Orientation( "Perpendicular" )})&amp;lt;&amp;lt;Show Major Grid( 1 );

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Quick question, how did you know to use Scalebox?&amp;nbsp; When I looked at the properties of the Process Screener I didn't see Scalebox called out.&amp;nbsp; When I clicked on the axis of the charts it said Axisbox.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jan 2024 18:47:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713973#M89739</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2024-01-07T18:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through "SendToReport" element in process screener</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713977#M89740</link>
      <description>&lt;P&gt;This part told me that I could (at least try) to use ScaleBox&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1704653882796.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60213iBE9E7542C7F9F23F/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1704653882796.png" alt="jthi_0-1704653882796.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could have also used AxisBox (it might be that in earlier JMP versions you would have had to use axisbox). Note that it has different start index&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
obj = dt &amp;lt;&amp;lt; Process Screening(
	Process Variables(Column Group("Processes")),
	Grouping(:SITE),
	Control Chart Type("Indiv and MR"),
	Show Charts as Selected(1),
	RowStates([0 1, 171 1, 245 1])
);

scs = Report(obj) &amp;lt;&amp;lt; XPath("//AxisBox");
xaxis_idx = 3::N Items(scs)::3;
scs[xaxis_idx] &amp;lt;&amp;lt; Min(-100) &amp;lt;&amp;lt; Max(400) &amp;lt;&amp;lt; Inc(100) &amp;lt;&amp;lt; Inc(100) &amp;lt;&amp;lt; Minor Ticks(2);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jan 2024 19:00:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713977#M89740</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-07T19:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through "SendToReport" element in process screener</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713980#M89741</link>
      <description>&lt;P&gt;Perfect, thanks!!&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jan 2024 22:29:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-quot-SendToReport-quot-element-in-process-screener/m-p/713980#M89741</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2024-01-07T22:29:23Z</dc:date>
    </item>
  </channel>
</rss>

