I'm new with JMP, and I have found those nice examples about creating nice prompts in book "Jump into JMP scripting".
Still, I do not know how I create a simple prompt and make a subset with scripting based on those values what I select from that prompt.
Prompt should 'collect' values from a character column variable "yearm", for example I would like to make graph builder based on yearmonth valkues between [201007, 201012].
All comments are welcome. Thank you in advance for helping me out with this problem.
Error message: invalid subscript (must be number or list of numbers){1} in access or evaluation of 'Subscript' , quarter[select1 << get]
Here is some code:
Summarize( quarter= By( Column( dt, "yearm" ) ) );
nw = New Window( "Choose quarters",
hb = Panel Box( "Choose yearm",
select1 = List Box ( quarter,
dt << Select Where(
:yearm== quarter[select1 << get] );
selRows = dt << Get Selected Rows;
)
),
Button Box( "OK",
nw << Close Window;
dt << Select Where(
:yearm== quarter[select1 << get]
);
/* Selected rows are subsetted into new table. */
dt << Subset( Output Table Name( "Chosen quarters" ) );
)
);