cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
exj
exj
Level II

Error when making prompts

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" ) );
)
);

10 REPLIES 10
exj
exj
Level II

Re: Error when making prompts

Ok, I'll try it and reply when my JMP will be updated to 10. Updating media has arrived but it's still waiting.

Thank you very much, you are such a pro user with this. Hopefully I'm learning something as well.