Using an OR statement in selecting rows for exclusionI am a JSL newbie ...
I want to select rows and then hide and exclude based on two criteria using an OR statement. I want to select when 'comment' is blank or when Excluded Sum < 2. I can get both conditions to work independently but when I combine them with an OR statement, no rows are selected. I have also tried current selection ("extend") with the same result. I am using JMP 15.2.0
dt =Current Data Table();
dt <<CLEAR row="" states=""></CLEAR>
Thank you for any thoughts on this.
Data Blending and CleanupRe: Using an OR statement in selecting rows for exclusion@Craige_Hales That works perfectly! I need to brush up on my logic skills as well as learning JSL. Thank you.
Re: Using an OR statement in selecting rows for exclusion@txnelsonI was afraid of that - it seems my logic is rusty. Thanks.
Re: Using an OR statement in selecting rows for exclusionI 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
dt =Current Data Table();
dt <<CLEAR row="" states="">= 2 // if there are too many excluded
);
//dt << invert row selection; // leave this out, it makes the logic hard to follow
dt << exclude;
dt << hide;</CLEAR>
Re: Using an OR statement in selecting rows for exclusionThe data table you provided has no rows that do not meet the criteria for you Select Where. Every row has either an Excluded value less than 2 or a Comment that is blank, or both. Every row that has a Comment, has an Excluded Sum of 1, which is less than 2. So given your code, no rows will end up hidden and excluded.
Re: Using an OR statement in selecting rows for exclusion@txnelson I still can't get the script to work on my data set. I've trimmed it down and attached it with the script to this post. I'm afraid I'm missing something obvious here. Thanks.
Re: Using an OR statement in selecting rows for exclusionMy test case works great, using your code.

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 << Clear Row States();
dt << select where( :comment == "" | :Excluded Sum < 2 );
dt << invert row selection;
dt << exclude;
dt << hide;