<?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 Looking to automate a process and coming at problem from two methods, looking for guidance: in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Looking-to-automate-a-process-and-coming-at-problem-from-two/m-p/604452#M80723</link>
    <description>&lt;P&gt;Hi all, I'm running a script that takes a column from a data table and summarises it like so:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = Current Data Table();

fails = dt &amp;lt;&amp;lt; Summary(Group( :Test_Name ),Freq( "None" ),Weight( "None" ),Output Table( "Tests that have Failed" ));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The general method in our process is to select a row in the table created:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OC200m_0-1677153355587.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50385i3253AD8EAA8EAFB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OC200m_0-1677153355587.png" alt="OC200m_0-1677153355587.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There can be any number of rows in this first summary table shown above so it needs to be implemented using a for loop to remain general. When doing manually, I select one of the rows in this summary column, return to the original table, right click "selected" in the bottom corner and then click "data view" like below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OC200m_0-1677161861389.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50388i62AF75007999DFC6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OC200m_0-1677161861389.png" alt="OC200m_0-1677161861389.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then apply this script to it:&amp;nbsp;&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 = Current Data Table();

dt &amp;lt;&amp;lt; text to columns( delimiter( ":" ), columns( :Test_Result ) );
dt &amp;lt;&amp;lt; Summary(Group( :Test_Result 2 ),Freq( "None" ),Weight( "None" ),Output Table( "Patterns to Keep" ));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have tried doing in another way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to access each element in the test_name column of the summary table in a for loop, trying to select the elements equal to the test_name selected by the for loop in the original table and creating a subset table from that, then summarising that but the debugger isn't being verbose enough to see the issue:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = Current Data Table();
fails = dt &amp;lt;&amp;lt; Summary(Group( :Test_Name ),Freq( "None" ),Weight( "None" ),Output Table( "Tests that have Failed" ));
testlist={};
For( i = 1, i &amp;lt;= Nrows(fails), i++, test=Column(fails,i);
tab= dt &amp;lt;&amp;lt; select where(contains(:Test_Name,test));
For( i = 1, i &amp;lt;= Nrows(fails), i++,
		tab &amp;lt;&amp;lt; Summary(Group( :Test_Result 2 ),Freq( "None" ),Weight( "None" ),Output Table( "Patterns to Keep" ));

	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance on either how to piece together my first attempt or to correct the issue with my second would be much appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 16:33:49 GMT</pubDate>
    <dc:creator>OC200m</dc:creator>
    <dc:date>2023-06-08T16:33:49Z</dc:date>
    <item>
      <title>Looking to automate a process and coming at problem from two methods, looking for guidance:</title>
      <link>https://community.jmp.com/t5/Discussions/Looking-to-automate-a-process-and-coming-at-problem-from-two/m-p/604452#M80723</link>
      <description>&lt;P&gt;Hi all, I'm running a script that takes a column from a data table and summarises it like so:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = Current Data Table();

fails = dt &amp;lt;&amp;lt; Summary(Group( :Test_Name ),Freq( "None" ),Weight( "None" ),Output Table( "Tests that have Failed" ));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The general method in our process is to select a row in the table created:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OC200m_0-1677153355587.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50385i3253AD8EAA8EAFB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OC200m_0-1677153355587.png" alt="OC200m_0-1677153355587.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There can be any number of rows in this first summary table shown above so it needs to be implemented using a for loop to remain general. When doing manually, I select one of the rows in this summary column, return to the original table, right click "selected" in the bottom corner and then click "data view" like below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OC200m_0-1677161861389.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50388i62AF75007999DFC6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OC200m_0-1677161861389.png" alt="OC200m_0-1677161861389.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then apply this script to it:&amp;nbsp;&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 = Current Data Table();

dt &amp;lt;&amp;lt; text to columns( delimiter( ":" ), columns( :Test_Result ) );
dt &amp;lt;&amp;lt; Summary(Group( :Test_Result 2 ),Freq( "None" ),Weight( "None" ),Output Table( "Patterns to Keep" ));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have tried doing in another way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to access each element in the test_name column of the summary table in a for loop, trying to select the elements equal to the test_name selected by the for loop in the original table and creating a subset table from that, then summarising that but the debugger isn't being verbose enough to see the issue:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = Current Data Table();
fails = dt &amp;lt;&amp;lt; Summary(Group( :Test_Name ),Freq( "None" ),Weight( "None" ),Output Table( "Tests that have Failed" ));
testlist={};
For( i = 1, i &amp;lt;= Nrows(fails), i++, test=Column(fails,i);
tab= dt &amp;lt;&amp;lt; select where(contains(:Test_Name,test));
For( i = 1, i &amp;lt;= Nrows(fails), i++,
		tab &amp;lt;&amp;lt; Summary(Group( :Test_Result 2 ),Freq( "None" ),Weight( "None" ),Output Table( "Patterns to Keep" ));

	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance on either how to piece together my first attempt or to correct the issue with my second would be much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:33:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Looking-to-automate-a-process-and-coming-at-problem-from-two/m-p/604452#M80723</guid>
      <dc:creator>OC200m</dc:creator>
      <dc:date>2023-06-08T16:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Looking to automate a process and coming at problem from two methods, looking for guidance:</title>
      <link>https://community.jmp.com/t5/Discussions/Looking-to-automate-a-process-and-coming-at-problem-from-two/m-p/604504#M80727</link>
      <description>&lt;P&gt;I would solve the issue by just adding a BY() variable to your second Summary&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;tab &amp;lt;&amp;lt; Summary(Group( :Test_Result 2 ),Freq( "None" ),Weight( "None" ),Output Table( "Patterns to Keep" ),
	by( :Test_Name )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Feb 2023 15:13:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Looking-to-automate-a-process-and-coming-at-problem-from-two/m-p/604504#M80727</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-02-23T15:13:56Z</dc:date>
    </item>
  </channel>
</rss>

