<?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: Deleting a row based on the presence of specific words in a cell in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781784#M96469</link>
    <description>&lt;P&gt;You can also do it without variables but I wouldn't suggest it as it is much more difficult to read and harder to debug if there are any issues&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt_new2 &amp;lt;&amp;lt; delete rows(dt_new2 &amp;lt;&amp;lt; get rows where(Contains(:Column 1, "Recipe"))); 
dt_new2 &amp;lt;&amp;lt; delete rows(dt_new2 &amp;lt;&amp;lt; get rows where(Contains(:Column 1, "File")));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 Aug 2024 05:47:38 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-08-15T05:47:38Z</dc:date>
    <item>
      <title>Deleting a row based on the presence of specific words in a cell</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781404#M96422</link>
      <description>&lt;P&gt;Hello All!&amp;nbsp; I think this might be a common situation for many working with data files from various instruments. My data sets are derived from stitching multiple output files from a specific instrument.&amp;nbsp; Besides the useful data rows, there are a number of rows on top of each output file that specify the Recipe, File, and others, typically, this info is in Column 1.&amp;nbsp; For processing the data, I do not need that info, so I want to delete the unnecessary rows containing the above words Recipe, File, etc. in the cells in Column 1.&amp;nbsp; Note that there might be other words in the same cells, for example: "Wafer Recipe Name", or "Stage Group File", etc.&amp;nbsp; I tried a number of permutations on the following, but I always get an error message saying: "Send expects scriptable objects in access of evaluation of "Send", etc.&amp;nbsp; Many thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt_new2 &amp;lt;&amp;lt; get rows where (contains (:Column 1, "Recipe"));&lt;BR /&gt;dt_new2 &amp;lt;&amp;lt; delete rows;&lt;BR /&gt;Wait(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt_new2 &amp;lt;&amp;lt; get rows where (contains (:Column 1, "File"));&lt;BR /&gt;dt_new2 &amp;lt;&amp;lt; delete rows;&lt;BR /&gt;Wait(1)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 00:10:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781404#M96422</guid>
      <dc:creator>BladeRunner</dc:creator>
      <dc:date>2024-08-14T00:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting a row based on the presence of specific words in a cell</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781414#M96423</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt_new2 = Current Data Table();
dt_new2 &amp;lt;&amp;lt; select where( Contains( :Column 1, "Recipe" ) );
dt_new2 &amp;lt;&amp;lt; delete rows;
Wait( 0 );

dt_new2 &amp;lt;&amp;lt; select where( Contains( :Column 1, "File" ) );
dt_new2 &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Scripting Index&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help=&amp;gt;Scripting Index&lt;/P&gt;
&lt;P&gt;is a great source of statement syntax and examples.&lt;/P&gt;
&lt;P&gt;Also, I advise you to take the time to read through the Scripting Guide found in the JMP Help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 00:35:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781414#M96423</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-14T00:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting a row based on the presence of specific words in a cell</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781460#M96427</link>
      <description>&lt;P&gt;If you wish to just use &amp;lt;&amp;lt; Delete Rows without any arguments, you have to select rows (like Jim did show). Other option is to collect your rows into a variable and use that (my preferred method as it skips "unnecessary" row selection but selection is more visual if you wish to debug)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

rows_to_delete = dt_new2 &amp;lt;&amp;lt; get rows where(Contains(:Column 1, "Recipe"));
dt_new2 &amp;lt;&amp;lt; delete rows(rows_to_delete); 

rows_to_delete = dt_new2 &amp;lt;&amp;lt; get rows where(Contains(:Column 1, "File"));
dt_new2 &amp;lt;&amp;lt; delete rows(rows_to_delete);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This behaviour is not documented in Scripting Index,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1723608431578.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67115i5836E139C1C35B27/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1723608431578.png" alt="jthi_0-1723608431578.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;but it can be found from JSL Syntax Reference&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/18.0/#page/jmp/data-table-messages.shtml?os=win&amp;amp;source=application#ww1902244" target="_blank"&gt;Data Table Messages (jmp.com)&lt;/A&gt;&amp;nbsp;and Scripting Guide&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/18.0/#page/jmp/delete-rows.shtml#ww725039" target="_blank"&gt;Delete Rows (jmp.com)&lt;/A&gt;&amp;nbsp;(search Delete Rows from Script Editor and press Topic Help)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 04:08:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781460#M96427</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-14T04:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting a row based on the presence of specific words in a cell</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781769#M96465</link>
      <description>&lt;P&gt;Hi, txnelson, thank you for your reply!&amp;nbsp; Like I said, I tried a bunch of related commands, including select where + contains, but without the statement Names default to here at the top, that approach did not work previously.&amp;nbsp; The routine works for me now, many thanks for the input.&amp;nbsp; Cheers!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 23:11:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781769#M96465</guid>
      <dc:creator>BladeRunner</dc:creator>
      <dc:date>2024-08-14T23:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting a row based on the presence of specific words in a cell</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781770#M96466</link>
      <description>&lt;P&gt;Hi jthi, thank you for your reply, I appreciate it.&amp;nbsp; I always remind myself to rely more on variables, but unfortunately, I do it only when there are no other options.&amp;nbsp; A great suggestion, I am sure it will be useful to many others.&amp;nbsp; Cheers!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 23:15:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781770#M96466</guid>
      <dc:creator>BladeRunner</dc:creator>
      <dc:date>2024-08-14T23:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting a row based on the presence of specific words in a cell</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781784#M96469</link>
      <description>&lt;P&gt;You can also do it without variables but I wouldn't suggest it as it is much more difficult to read and harder to debug if there are any issues&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt_new2 &amp;lt;&amp;lt; delete rows(dt_new2 &amp;lt;&amp;lt; get rows where(Contains(:Column 1, "Recipe"))); 
dt_new2 &amp;lt;&amp;lt; delete rows(dt_new2 &amp;lt;&amp;lt; get rows where(Contains(:Column 1, "File")));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Aug 2024 05:47:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-a-row-based-on-the-presence-of-specific-words-in-a-cell/m-p/781784#M96469</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-15T05:47:38Z</dc:date>
    </item>
  </channel>
</rss>

