IF Statement according to user inputHi,
I am trying to create a basic script with an IF statement, I'm not that familiar if a CASE statement exist in JMP but what I'm try to do is similar to a case statement.
1. Ask the user to input a number ranging from 1-20 only
2. Create an if statement and execute the command with accordance to the user input
For example: User input : 2
*Executes script inside bracket 2
Can you advise a basic tutorial set that might help with this?
Advanced Statistical ModelingAutomation and ScriptingConsumer and Market ResearchQuality and Process EngineeringRe: IF Statement according to user inputYou can be a more direct with your user interface. Try this code:
nw = new window("Test",
panel box("Click the icon to run the program: ",
lineup box(ncol(2),
text box("1. Tree Map"),
button box("", << set icon("TreeMap"),
<< set function(include("treemap.jsl"))),
text box("2. Neural Net"),
button box("", << set icon("NeuralNet"),
<< set function(include("NeuralNet.jsl"))),
text box("3. Model Comparison"),
button box("", << set icon("ModelComparison"),
<< set function(include("ModelComparison.jsl"))),
text box("4. SAS Pyramid"),
button box("", << set icon("SASPyramid"),
<< set function(include("SASPyramid.jsl"))),
),
),
);
You would substitute the appropriate code where I have . To get the various icons use Justin Chilton's Built in JMP Icons addin.
Re: IF Statement according to user inputYou can try something like this 
userinput = New Window( "Collect user input", <<MODAL> 20,
New Window("Error!!", Text Box(" Please input a number from 1 to 20 ONLY! ")),
if(num(number_input) == 1,
//DO SOMETHING...
num(number_input) == 2,
//DO SOMETHING...
);
);</MODAL>