Hi Michal.
The cool thing in JMP: jou don't have to know any scripting, you can just use the GUI and your mouse.
Then after executing the steps, you can go to the advanced log and check the code ...
- Rows/ Row Selection/ Select Where (Ctrl + W)
- open data view for selected rows:
- check the log:
Jmp understands what you want - and even combines the two steps to a single line of code:
If you want to construct the command on your own, you can define some strings, concatenate them and then parse and evaluate the final code:
cond1 = "Is Missing( :age )";
cond2 = ":age > 16";
Eval(Parse("dt << Select where( "|| cond1 || " | " || cond2 || " ) << Data View;"))
My suggestion: invest some time to learn and understand Expression Handling
A great tutorial: Using JSL to Develop Efficient, Robust Applications (EU 2018 415) by @joseph_morgan
You will see, actually it's quite similar to your approach:
store some conditions as JSL "symbols" condition 1, condition 2 ... then use them to construct your final expression and evaluate it.
With some code fixes and Expr() and Name Expr() here and there (to prevent Jmp from evaluating the conditions before they can be plugged into the final line of code) the code should look like this:
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
condition 1 = Expr(Is Missing( :age ));
condition 2 = Expr(:age > 16 );
combined condition=Expr(or());
Insert into(combined condition, Name Expr(condition1));
Insert into(combined condition, Name Expr(condition2));
Eval(Substitute(dt << Select where( _cond_ ) << Data View),
Expr(_cond_),Name Expr(combined condition)));