<?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: Using an OR statement in selecting rows for exclusion in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297439#M55796</link>
    <description>&lt;P&gt;My test case works great, using your code.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="select.PNG" style="width: 451px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26552iC392B76CF08A2332/image-size/large?v=v2&amp;amp;px=999" role="button" title="select.PNG" alt="select.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Example",
	Add Rows( 10 ),
	New Column( "Comment",
		Character,
		"Nominal",
		Set Values(
			{"not blank", "not blank", "", "not blank", "", "not blank", "not blank",
			"", "not blank", "not blank"}
		),
		Set Display Width( 89 )
	),
	New Column( "Excluded Sum",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [5, 1, 51, 44, 6, 0, 7, 1.5, 9, -5] )
	)
);
dt &amp;lt;&amp;lt; Clear Row States();
dt &amp;lt;&amp;lt; select where( :comment == "" | :Excluded Sum &amp;lt; 2 );
dt &amp;lt;&amp;lt; invert row selection;
dt &amp;lt;&amp;lt; exclude;
dt &amp;lt;&amp;lt; hide;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Sep 2020 23:23:50 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-09-01T23:23:50Z</dc:date>
    <item>
      <title>Using an OR statement in selecting rows for exclusion</title>
      <link>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297427#M55795</link>
      <description>&lt;P&gt;I am a JSL newbie ...&lt;/P&gt;&lt;P&gt;I want to select rows and then hide and exclude based on two criteria using an OR statement.&amp;nbsp; I want to select when 'comment' is blank or when Excluded Sum &amp;lt; 2.&amp;nbsp; I can get both conditions to work independently but when I combine them with an OR statement, no rows are selected.&amp;nbsp; I have also tried current selection ("extend") with the same result.&amp;nbsp; I am using JMP 15.2.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt =Current Data Table();
dt &amp;lt;&amp;lt;Clear Row States();
dt &amp;lt;&amp;lt; select where(:comment == "" | :Excluded Sum &amp;lt; 2);   
dt &amp;lt;&amp;lt; invert row selection;
dt &amp;lt;&amp;lt; exclude;
dt &amp;lt;&amp;lt; hide;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any thoughts on this.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:36:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297427#M55795</guid>
      <dc:creator>jcminor</dc:creator>
      <dc:date>2023-06-09T23:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using an OR statement in selecting rows for exclusion</title>
      <link>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297439#M55796</link>
      <description>&lt;P&gt;My test case works great, using your code.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="select.PNG" style="width: 451px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26552iC392B76CF08A2332/image-size/large?v=v2&amp;amp;px=999" role="button" title="select.PNG" alt="select.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Example",
	Add Rows( 10 ),
	New Column( "Comment",
		Character,
		"Nominal",
		Set Values(
			{"not blank", "not blank", "", "not blank", "", "not blank", "not blank",
			"", "not blank", "not blank"}
		),
		Set Display Width( 89 )
	),
	New Column( "Excluded Sum",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [5, 1, 51, 44, 6, 0, 7, 1.5, 9, -5] )
	)
);
dt &amp;lt;&amp;lt; Clear Row States();
dt &amp;lt;&amp;lt; select where( :comment == "" | :Excluded Sum &amp;lt; 2 );
dt &amp;lt;&amp;lt; invert row selection;
dt &amp;lt;&amp;lt; exclude;
dt &amp;lt;&amp;lt; hide;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 23:23:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297439#M55796</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-01T23:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using an OR statement in selecting rows for exclusion</title>
      <link>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297729#M55821</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt; I still can't get the script to work on my data set.&amp;nbsp; I've trimmed it down and attached it with the script to this post.&amp;nbsp; I'm afraid I'm missing something obvious here.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 15:48:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297729#M55821</guid>
      <dc:creator>jcminor</dc:creator>
      <dc:date>2020-09-02T15:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using an OR statement in selecting rows for exclusion</title>
      <link>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297735#M55826</link>
      <description>&lt;P&gt;The data table you provided has no rows that do not meet the criteria for you Select Where.&amp;nbsp; Every row has either an Excluded value less than 2 or a Comment that is blank, or both.&amp;nbsp; Every row that has a Comment, has an Excluded Sum of 1, which is less than 2.&amp;nbsp; So given your code, no rows will end up hidden and excluded.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 16:11:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297735#M55826</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-02T16:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using an OR statement in selecting rows for exclusion</title>
      <link>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297773#M55828</link>
      <description>&lt;P&gt;I think rewriting the logic so the InvertRowSelection isn't needed might help make the intent clear. I'm guessing you might really mean something like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt =Current Data Table();
dt &amp;lt;&amp;lt;Clear Row States();
dt &amp;lt;&amp;lt; select where(
	:comment != "" // exclude if there is a comment
	| // or 
	:Excluded Sum &amp;gt;= 2 // if there are too many excluded
);   
//dt &amp;lt;&amp;lt; invert row selection; // leave this out, it makes the logic hard to follow
dt &amp;lt;&amp;lt; exclude;
dt &amp;lt;&amp;lt; hide;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Sep 2020 16:38:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297773#M55828</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-09-02T16:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using an OR statement in selecting rows for exclusion</title>
      <link>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297902#M55833</link>
      <description>&lt;P&gt;@txnelsonI was afraid of that - it seems my logic is rusty.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 18:29:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297902#M55833</guid>
      <dc:creator>jcminor</dc:creator>
      <dc:date>2020-09-02T18:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using an OR statement in selecting rows for exclusion</title>
      <link>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297922#M55834</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;That works perfectly!&amp;nbsp; I need to brush up on my logic skills as well as learning JSL.&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 18:32:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-an-OR-statement-in-selecting-rows-for-exclusion/m-p/297922#M55834</guid>
      <dc:creator>jcminor</dc:creator>
      <dc:date>2020-09-02T18:32:20Z</dc:date>
    </item>
  </channel>
</rss>

